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:
guy 2016-02-25 11:30:51 +00:00
parent 150972f6e5
commit 5fde0436de
33 changed files with 1247 additions and 829 deletions

View File

@ -74,6 +74,8 @@ protected:
static bool tipo_handler(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 previd_handler(TMask_field& f, KEY key);
static bool email_handler(TMask_field& f, KEY k);
static bool rsoc_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();
const bool fis = f.get() == "F";
m.show(-5, fis);
return true;
}
@ -348,7 +349,7 @@ bool TClifo_application::crea_percipienti(TMask_field& f, KEY key)
if (anag.read() == NOERR)
{
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;
}
}
@ -411,26 +412,25 @@ bool TClifo_application::crea_percipienti(TMask_field& f, KEY key)
bool TClifo_application::percip_handler(TMask_field& f, KEY key)
{
TMask& m = f.mask();
const bool full = f.get().full();
if (f.to_check(key, true))
{
const bool full = !f.empty();
m.enable(DLG_ANAG, !full);
m.enable(DLG_PERC, full && main_app().has_module(M77AUT));
}
if (f.to_check(key) && full)
{
const long percip = m.get_long(F_CODANAGPER);
const char tipo = m.get(F_TIPOAPER)[0];
TToken_string k;
k.add(tipo);
k.add(percip);
const TRectype & anag = cache().get(LF_ANAG, k);
const TString& c = m.get(F_COFI), p = m.get(F_PAIV);
TToken_string k; k.add(tipo); k.add(percip);
const TRectype& anag = cache().get(LF_ANAG, k);
if (key == K_TAB && anag.empty())
return true;
if ((c.full() && c != anag.get(ANA_COFI)) ||
const TString& c = m.get(F_COFI);
const TString& p = m.get(F_PAIV);
if ((c.full() && c != anag.get(ANA_COFI)) ||
(p.full() && p != anag.get(ANA_PAIV)))
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;
}
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)
{
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_TIPOPERS, tipo_handler);
_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_CODALLEG, codalleg_handler);
_msk->set_handler(DLG_EMAIL, email_handler);

View File

@ -181,6 +181,7 @@
#define F_DESENTE 314
#define F_INDENTE 315
#define F_SPLITPAY 316
#define DLG_PERC 317
#define F_TPIMBALLO 401
#define F_DIMENSIONE 402

View File

@ -608,7 +608,7 @@ END
LIST F_SESSO 1 12
BEGIN
PROMPT 38 17 "Sesso"
PROMPT 34 17 "Sesso"
HELP "Sesso della persona fisica"
ITEM "M|Maschio"
ITEM "F|Femmina"
@ -616,6 +616,13 @@ BEGIN
GROUP 5
END
BUTTON DLG_PERC 15 1
BEGIN
PROMPT 57 17 "Dati Previdenziali"
GROUP 4
END
NUMBER F_STATONASC 3
BEGIN
PROMPT 2 18 "Stato "

View File

@ -3157,13 +3157,21 @@ bool TPrimanota_application::liqdiff_handler(TMask_field& f, KEY key)
// Certified 99%
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();
if (key == K_ENTER && f.get().full())
{
if (app().is_fattura_split())
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;

View File

@ -9,6 +9,7 @@
#include <recarray.h>
#include <reprint.h>
#include <reputils.h>
#include <sheet.h>
#include <textset.h>
#include <validate.h>
#include <utility.h>

View File

@ -128,7 +128,7 @@ bool TLiquidazione_app::user_create()
_att_r = &(_nditte->curr(LF_ATTIV));
_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;
// Caro tab11, ricordati che un giorno sarai un file unico!
@ -144,8 +144,7 @@ bool TLiquidazione_app::user_create()
TDate oggi(TODAY);
_year.format("%d",oggi.year());
_month = oggi.month();
TConfig conf(CONFIG_STUDIO);
_sind11 = conf.get_bool("Sind11");
_sind11 = ini_get_bool(CONFIG_STUDIO, "cg", "Sind11");
}
else // parse messaggio
{
@ -625,8 +624,7 @@ void TLiquidazione_app::build_nomiditte()
if (good)
{
// check no parametri liquidazione
if (!look_lia(dt.get_long("CODDITTA")))
good = FALSE;
good = look_lia(dt.get_long("CODDITTA"));
}
else
continue;
@ -639,7 +637,7 @@ void TLiquidazione_app::build_nomiditte()
if (good)
{
d->add(_lia->get("S7"));
d->add(_lia->get("B2"));
d->add(_lia->get("B5")); // IVA per cassa
}
else
{
@ -848,9 +846,9 @@ void TLiquidazione_app::build_ditte_sheet(wht what)
TToken_string* d = new TToken_string(64);
*d = (TToken_string&)_nomiditte[i];
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'))
continue;

View File

@ -446,7 +446,7 @@ protected:
bool print_inc_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 sarebbe_da_pagare(const TRectype& mov, const TDate& fine) const;
bool sarebbe_maturata(const TRectype& mov, const TDate& inizio, const TDate& fine) const;
public:

View File

@ -305,6 +305,7 @@ bool TLiquidazione_app::update_firm(int month, bool recalc)
_pla->zero("R15");
_pla->zero("R16");
_pla->zero("R17");
_pla->zero("R18");
_pla->put("S1","0");
_pla->put("S2","0");
_pla->put("S3","0");
@ -594,12 +595,25 @@ bool TLiquidazione_app::ivadiff_chiusa(const TRectype& mov, const TDate& fine) c
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
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)
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.
// In assenza della data documento siamo costretti ad usare la data di registrazione
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
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
}
else
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(LF_CLIFO, key);
const TRectype& clifo = cache().get_rec(LF_CLIFO, mov.get_char(MOV_TIPO), mov.get_long(MOV_CODCF));
int alleg = clifo.get_int(CLI_ALLEG);
if (alleg == 7 || alleg == 8) // Ente pubblico e amministrazione controllata ...
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;
}
if (ivadiff_chiusa(mov, fine))
if (ivadiff_chiusa(mov, min(data_lim,fine)))
return false;
if (giorni >= 365)
return true; // E' passato più di un anno!
return false;
return true; // E' passato più di un anno!
}
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_c1a_bam = ZERO; // Beni ammorizzabili esenti c1a
real esenti_b14 = ZERO;
real vendite_rev = ZERO; // Vendire in reverse charge (da escludere in prorata)
// Comunicazione dati iva annuale (dal 2003)
real cessioni_cd1_1 = ZERO; // Totale operazioni attive
@ -901,11 +911,12 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt)
real acquisti_cd2_2 = ZERO; // non imponibili
real acquisti_cd2_3 = ZERO; // esenti
real acquisti_cd2_4 = ZERO; // intra
real acquisti_cd2_5 = ZERO; // beni strumentali
real acquisti_cd2_5 = ZERO; // beni strumentali
real oroargento_cd3_1 = ZERO; // imponibile 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_4 = ZERO; // imposta acquisto rottami
real rottami_cd3_3 = ZERO; // imponibile 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 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);
TDate t;
if (_recalc_regis) // Vecchia selezione prima del 1998 o calcolo progressivi per stampa registri bollati
{
t.set_month(month == 13 ? 12 : month);
@ -1079,8 +1089,12 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt)
trueatt.cut(5);
TString pimsg;
pimsg << TR("Ricalcolo attività ") << trueatt << " (" << TR("mese ")
<< (month > 12 ? "13" : itom(month)) << ' ' << year_int << ')';
pimsg << TR("Ricalcolo attività ") << trueatt << " (";
if (month > 12)
pimsg << "13ma ";
else
pimsg << TR("mese ") << itom(month);
pimsg << ' ' << year_int << ')';
TProgress_monitor pi(items, pimsg, false);
for (; _cur->pos() < items; ++(*_cur))
@ -1106,7 +1120,7 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt)
}
#ifndef NDEBUG
if (_mov->get_long(MOV_NUMREG) == 19956)
if (_mov->get_long(MOV_NUMREG) == 23353)
int cazzone = 1;
#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
if (tipomov == vendita && (tm == tm_fattura || tm == tm_nota_credito) &&
!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
}
// Inizio gestione IVA differita
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
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)
{
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)
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)
{
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)
{
// 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;
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
if (!nc.is_zero() && pagscaold.items() > pagscatt.items())
if (!nc_tot.is_zero() && pagscaold.items() > pagscatt.items())
{
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);
saldo += pg; saldo += nc;
saldo += pg_tot; saldo += nc_tot;
saldo.normalize(sezfat);
if (saldo.valore() > ZERO)
tot_da_incassare = saldo.valore();
@ -1236,15 +1286,16 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt)
else
{
// 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);
}
}
// 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;
datainc = fine;
datainc = data_maturazione_IVA_diff(_mov->curr());
_mov->put(MOV_DATAINC, datainc);
}
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 real totfat = _mov->get(MOV_TOTDOC);
#ifndef NDEBUG
if (_mov->get_long(MOV_NUMREG) == 23353)
int cazzone = 1;
#endif
TLocalisamfile id(LF_IVADIFF);
TRectype& idcurr = id.curr();
FOR_EACH_ARRAY_ITEM(pagscatt, r, obj)
@ -1651,75 +1707,75 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt)
const TString& iva_vpn = _iva->get(tipomov == vendita ? "S10" : "S11");
// Aggiunto "&& is_detraibile" al test altrimenti somma due volte imponibile_orig (22/01/2015)
if (iva_vpn.full() && _mov->get(MOV_ANNOIVA) == _year && is_detraibile)
// Aggiunto "&& is_detraibile==0" al test altrimenti somma due volte imponibile_orig (22/01/2015)
if (!bIsMovDiff && iva_vpn.full() && _mov->get_int(MOV_ANNOIVA) == year_int && is_detraibile == 0)
{
switch (tipomov)
{
case vendita: // CD1 - 1 2 3 4
{
// bool is_valid = !corrisp && tipodoc != "AF" && (cau_intra || !cau_valintra) &&
// sosp_imp != normale && sosp_imp != liquidazione;
bool is_valid = tipodoc != "AF" && sosp_imp != normale && sosp_imp != liquidazione;
if (is_valid)
{
cessioni_cd1_1 += imponibile_orig;
if (iva_vpn.starts_with("CD1"))
{
if (tipocr == 4)
cessioni_cd1_5 += imponibile_orig;
}
if (!cau_intra)
{
if (iva_vpn == "CD12")
cessioni_cd1_2 += imponibile_orig; else
if (iva_vpn == "CD13")
cessioni_cd1_3 += imponibile_orig;
}
else
{
if (iva_vpn == "CD14")
cessioni_cd1_4 += imponibile_orig;
}
}
}
break;
case acquisto: // CD2 - 1 2 3 4
{
acquisti_cd2_1 += imponibile_orig;
if (iva_vpn.starts_with("CD2"))
case vendita: // CD1 - 1 2 3 4
{
// bool is_valid = !corrisp && tipodoc != "AF" && (cau_intra || !cau_valintra) &&
// sosp_imp != normale && sosp_imp != liquidazione;
bool is_valid = tipodoc != "AF" && sosp_imp != normale && sosp_imp != liquidazione;
if (is_valid)
{
cessioni_cd1_1 += imponibile_orig;
if (iva_vpn.starts_with("CD1"))
{
if (tipocr == 2 || tipocr == 3 || tipocr == 8)
acquisti_cd2_5 += imponibile_orig;
if (tipocr == 4)
cessioni_cd1_5 += imponibile_orig;
}
if (!cau_intra)
{
if (iva_vpn == "CD22")
acquisti_cd2_2 += imponibile_orig;
else
if (iva_vpn == "CD23")
acquisti_cd2_3 += imponibile_orig;
}
else
{
if (iva_vpn == "CD24")
acquisti_cd2_4 += imponibile_orig;
}
if (iva_vpn == "CD31")
{
oroargento_cd3_1 += imponibile_orig;
oroargento_cd3_2 += imposta_orig;
}
if (iva_vpn == "CD33")
{
rottami_cd3_3 += imponibile_orig;
rottami_cd3_4 += imposta_orig;
}
}
break;
default:
break;
if (!cau_intra)
{
if (iva_vpn == "CD12")
cessioni_cd1_2 += imponibile_orig; else
if (iva_vpn == "CD13")
cessioni_cd1_3 += imponibile_orig;
}
else
{
if (iva_vpn == "CD14")
cessioni_cd1_4 += imponibile_orig;
}
}
}
break;
case acquisto: // CD2 - 1 2 3 4
{
acquisti_cd2_1 += imponibile_orig;
if (iva_vpn.starts_with("CD2"))
{
if (tipocr == 2 || tipocr == 3 || tipocr == 8)
acquisti_cd2_5 += imponibile_orig;
}
if (!cau_intra)
{
if (iva_vpn == "CD22")
acquisti_cd2_2 += imponibile_orig;
else
if (iva_vpn == "CD23")
acquisti_cd2_3 += imponibile_orig;
}
else
{
if (iva_vpn == "CD24")
acquisti_cd2_4 += imponibile_orig;
}
if (iva_vpn == "CD31")
{
oroargento_cd3_1 += imponibile_orig;
oroargento_cd3_2 += imposta_orig;
}
if (iva_vpn == "CD33")
{
rottami_cd3_3 += imponibile_orig;
rottami_cd3_4 += imposta_orig;
}
}
break;
default:
break;
}
}
}
@ -1841,16 +1897,16 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt)
* (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))
{
cess_amm += imponibile;
cess_amm_iva += imposta;
}
}
}
if (is_detraibile && !imponibile.is_zero() && is_reverse_charge(_mov->curr()))
vendite_rev += imponibile;
}
break;
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
bool true_corrisp = FALSE;
bool true_corrisp = false;
if (corrisp)
{
/*
@ -2423,12 +2479,15 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt)
if (tipomov == vendita)
{
#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 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,
_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
// 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("R11", ammort_indet);
_pom->put("R12", ammort_indet_iva);
_pum->put("R0", cess_amm);
_pum->put("R1", cess_amm_iva);
_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("R26", acquisti_cd2_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("R1", vendite);
_pam->put("R6", assp_imp);
@ -3441,7 +3504,7 @@ void TLiquidazione_app::write_liq(int month, const char* codatts)
deltam -= month;
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;
@ -3682,12 +3745,15 @@ void TLiquidazione_app::write_liq(int month, const char* codatts)
if (somma_rettifiche)
{
const real rett = _lim->get_real("R5");
risultato += rett;
rettifiche += rett;
if (rett.sign() < 0)
res_cred -= rett;
else
res_debt += rett;
if (!rett.is_zero())
{
risultato += rett;
rettifiche += rett;
if (rett.sign() < 0)
res_cred -= rett;
else
res_debt += rett;
}
}
}
@ -3851,18 +3917,18 @@ void TLiquidazione_app::write_liq(int month, const char* codatts)
real es_c3_am = _pla->get_real("R16");
real es_c1a_am = _pla->get_real("R17");
real csamm = _pla->get_real("R4");
real ven_rev = _pla->get_real("R18");
real prorata = 0.0;
real conguaglio = 0.0;
real topay = 0.0;
const real ris = vf1 + vf2; // gia' esclusi: NS, B3, cess. amm
// 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;
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);
}
@ -3892,7 +3958,7 @@ void TLiquidazione_app::write_liq(int month, const char* codatts)
// scrivi nuovo prorata in tabella anno successivo
const TString4 yr = _year;
_year.format("%d", atoi(_year) + 1);
look_pla(att, TRUE);
look_pla(att, true);
_pla->put("R8", prorata);
_pla->rewrite();
if (look_lia(0l, true))
@ -3942,7 +4008,7 @@ void TLiquidazione_app::write_liq(int month, const char* codatts)
look_lim(month+deltam,TRUE);
// 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 r5 = _lim->get("R5"); // Rettifiche
@ -4210,6 +4276,7 @@ void TLiquidazione_app::recalc_annual(const char* att)
real ven_lrd = 0.0;
real volaff1 = 0.0;
real volaff2 = 0.0;
real ven_rev = 0.0;
TString4 codiva,reg,tiva;
TToken_string va7("",'!');
@ -4231,6 +4298,7 @@ void TLiquidazione_app::recalc_annual(const char* att)
cess_amm = _pla->get_real("R4");
pro_pag = _pla->get_real("R12");
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
// 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_c1a_am += _pum->get_real("S5");
cess_amm += _pum->get_real("R0");
ven_rev += _pum->get_real("R28");
// Nota:
// l'iva acquisti del mese 13 memorizzata in PLM->R1, e' si' la sommatoria
@ -4342,7 +4411,8 @@ void TLiquidazione_app::recalc_annual(const char* att)
_pla->put("R11", iva_acq);
_pla->put("R12", pro_pag);
_pla->put("R14", volaff1);
_pla->put("S1", volaff2.string());
_pla->put("S1", volaff2.string());
_pla->put("R18", ven_rev);
_pla->rewrite();
}

View File

@ -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...
{
real cd1_1 = _pum->get_real("R14");
cd1_1 += imponibile;
_pum->put("R14", cd1_1);
_pum->curr().add("R14", imponibile); // CD1_1
_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
{
real cd1_1 = _pum->get_real("R14");
cd1_1 += imponibile;
_pum->put("R14", cd1_1);
_pum->curr().add("R14", imponibile); // CD1_1
_pum->rewrite();
}
}

View File

@ -1087,7 +1087,7 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt, const bool
// sospensione imposta: non piu' due palle, ma QUATTRO...
// 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);
real aqsi(tt.get(0));
real aqsv(tt.get(1));
@ -1140,19 +1140,20 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt, const bool
real v1 = _pla->get_real("R14"); // Totale imponibile vendite
real v2 = _pla->get_real("S1"); // Volume d'affari II attività
real ris = v1 + v2;
real e1 = _pla->get_real("R1"); // Totale vendite esenti C1
real e2 = _pla->get_real("R2"); // Totale vendite esenti C2
real e3 = _pla->get_real("R3"); // Totale vendite esenti C3
real e4 = _pla->get_real("R15"); // Totale vendite esenti C1A
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 e1 = _pla->get_real("R1"); // Totale vendite esenti C1
real e2 = _pla->get_real("R2"); // Totale vendite esenti C2
real e3 = _pla->get_real("R3"); // Totale vendite esenti C3
real e4 = _pla->get_real("R15"); // Totale vendite esenti C1A
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 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 ppg = _pla->get_real("R12"); // pro-rata pagato
// calcola nuovo prorata per ogni attivita' (miste: 1+2)
real pr;
const real rsa = ris - (e3-e5) - (e4-e6);
const real rsa = ris - (e3-e5) - (e4-e6) - vrc;
if (!rsa.is_zero())
{
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);
// MonsterFish: arrotonda alle 1000 LIRE C1,C2,C3,C1A
// MonsterFish: arrotonda all'Euro C1,C2,C3,C1A
round_imposta(e1);
round_imposta(e2);
round_imposta(e3);
@ -1185,10 +1186,13 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt, const bool
round_imposta(e6);
round_imposta(bam);
round_imposta(ris);
round_imposta(vrc);
// segna flag prorata
if ((e1+e2+e3+e4) > ZERO)
{
dd->_f0 |= IS_PRORATA;
}
dd->_r0 = ris;
dd->_r1 = e1;
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->_r8 = e5;
dd->_r9 = e6;
dd->_r10 = vrc;
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
TToken_string tt(80);
tt.add(_lam->get_real("R0").string()); // IVA Vendite
tt.add(_lam->get_real("R1").string()); // IVA Acquisti
tt.add(_lam->get_real("R2").string()); // Credito precedente
tt.add(_lam->get_real("R3").string()); // Debito precedente
tt.add(_lam->get_real("R4").string());
tt.add(_lam->get("R0")); // IVA Vendite
tt.add(_lam->get("R1")); // IVA Acquisti
tt.add(_lam->get("R2")); // Credito precedente
tt.add(_lam->get("R3")); // Debito precedente
tt.add(_lam->get("R4"));
d->_s0 = tt;
d->_s1 = _lim->get_real("R11").string(); // Acc. dec.
d->_s2 = _lim->get_real("R12").string();
d->_s3 = _lim->get_real("R13").string();
d->_s1 = _lim->get("R11"); // Acc. dec.
d->_s2 = _lim->get("R12");
d->_s3 = _lim->get("R13");
// descrizione rettifiche
if (month < 13)
@ -1421,7 +1426,7 @@ void TLiquidazione_app::set_firm(_DescrItem& d)
if (!_isregis)
{
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++,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);
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");
switch (tipodiff)
{
@ -1913,7 +1914,7 @@ void TLiquidazione_app::set_pim_head(_DescrItem& d)
// print_dainc_diff_log(r, d._f2, d._f3); // 15-03-2013 obosleto in quanto stampato su registri?
}
else
if (d._flags == PIM_HEAD_DI)
if (d._flags == PIM_HEAD_DI)
{
TString msg;
msg = TR("Incassi/pagamenti a liquidazione differita");
@ -2117,7 +2118,7 @@ void TLiquidazione_app::set_plm(_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
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()))
{
printed = TRUE;
printed = true;
set_row(row++, FR("Acquisto beni ammortizzabili IVA detraibile@50g%r@69g%r"),
&(d._r0),
&(d._r1));
@ -2730,7 +2731,7 @@ void TLiquidazione_app::set_grand(_DescrItem& d)
{
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)
{
@ -2748,8 +2749,7 @@ void TLiquidazione_app::set_grand(_DescrItem& d)
{
// esenti e non imponibili
set_row(rw++,"");
set_row(rw++,TR("1) Soggetto con quota di operazioni esenti e non"
" imponibili superiore al 25%%"));
set_row(rw++,TR("1) Soggetto con quota di operazioni esenti e non imponibili superiore al 25%%"));
real perc = di._r0 * CENTO / di._r1; perc.round(0);
@ -2765,8 +2765,7 @@ void TLiquidazione_app::set_grand(_DescrItem& d)
if (di._f1)
{
set_row(rw++,"");
set_row(rw++,TR("2) Soggetto con acquisti ad aliquota media "
"superiore a quella delle vendite"));
set_row(rw++,TR("2) Soggetto con acquisti ad aliquota media superiore a quella delle vendite"));
TString sep(strlen(REAL_PICTURE)+2); sep.fill('-');
set_row(rw++,"");
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_print_zero(FALSE);
set_print_zero(false);
}
}
// prospettino versamento
@ -2849,53 +2848,42 @@ void TLiquidazione_app::set_grand(_DescrItem& d)
bool TLiquidazione_app::set_annual(_DescrItem& d)
{
// chiamata internamente a set_pims
bool ret = FALSE;
bool ret = false;
int row = get_maxrow()+1;
if (row == 1) row = 4;
if (d._f0 & IS_PRORATA)
{
// non lo ha stampato prima se annuale, perche' Vladimiro il nefido
// pretende l'assurdo aggiornamento della perc. a quella nuova
// non lo ha stampato prima se annuale, perche' Vladimiro il nefido pretende l'assurdo aggiornamento della perc. a quella nuova
const int year_int = atoi(_year);
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++;
set_bookmark(TR("Calcolo pro-rata"), _att_bookmark);
ret = TRUE;
set_print_zero(TRUE);
ret = true;
set_print_zero(true);
set_row(row++,"");
if (year_int > 1997)
{
const real perc_det = CENTO - d._r2;
const TString16 s1 = perc_det.string();
const TString16 s2 = d._r2.string();
set_row(row++, FR("%% PRO-RATA (%s%%) ed IVA non detraibile (%s%%)@69g%r"),
(const char*)s1, (const char*)s2, &(d._r6));
set_row(row++,FR("C1 - Operazioni esenti escluse da nr. 1 a 9 e 11 art. 10 @69g%r"), &(d._r1));
set_row(row++,FR("C2 - Operazioni esenti di cui nr. 11 art. 10 @69g%r"), &(d._r4));
set_row(row++,FR("C3 - Operazioni esenti da nr. 1 a 9 art. 10 @69g%r"), &(d._r5));
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("@6gdi cui cessione beni ammortizzabili @69g%r"), &(d._r9));
set_row(row++,FR("Volume d'affari @69g%r"), &(d._r0));
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));
}
const real perc_det = CENTO - d._r2;
const real vol_aff = d._r0 - d._r10; // Valutare se eliminare d._r10 come valore e sottrarlo a monte
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"),
(const char*)s1, (const char*)s2, &(d._r6));
set_row(row++,FR("C1 - Operazioni esenti escluse da nr. 1 a 9 e 11 art. 10 @69g%r"), &(d._r1));
set_row(row++,FR("C2 - Operazioni esenti di cui nr. 11 art. 10 @69g%r"), &(d._r4));
set_row(row++,FR("C3 - Operazioni esenti da nr. 1 a 9 art. 10 @69g%r"), &(d._r5));
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("@6gdi cui cessione beni ammortizzabili @69g%r"), &(d._r9));
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_print_zero(FALSE);
}
return ret;

View File

@ -3022,8 +3022,7 @@ void TStampa_registri_app::on_page_printed(int file)
bool TStampa_registri_app::stampo_liquidazione(int mese)
{
//test tradotti alla lettera da AS/400
//assolutamente incongruenti !!!
//test tradotti alla lettera da AS/400 assolutamente incongruenti !!!
const bool trim_month_flag = (_frequiva == 'T' && (mese == 3 || mese == 6 || mese == 9 || mese == 12))
||_frequiva != 'T' || (mese == 12 && _tipo_riepilogativo == 'A');
@ -3100,8 +3099,7 @@ void TStampa_registri_app::liq_other_case()
{
TFilename app; app.temp();
int mese = _fino_a_mese;
//se la frequenza e' trimestrale
//aggiusta il mese al trimestre a cui appartiene
//se la frequenza e' trimestrale aggiusta il mese al trimestre a cui appartiene
if (_frequiva == 'T')
mese += 2 - ((mese-1) % 3);
send_message(calc_reg ? 'R' : 'C', app, calc_reg ? _datareg.month() : mese);

View File

@ -19,7 +19,7 @@ class TParametri_ditta : public TConfig_application
void check_registers(int year);
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 bool preprocess_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
_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();
if (dir.eox() == 0L || !file.exist())
{
set_autoload_new_files(FALSE);
set_autoload_new_files(false);
TSystemisamfile s(logicnum);
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;
lf.format("%sstd/lf%04d.txt", firm2dir(-1), logicnum);
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
mask.disable(-GROUP_CONTABILITA);
return TRUE;
return true;
}
bool TParametri_ditta::postprocess_config(TMask& mask, TConfig& config)
@ -183,7 +183,7 @@ bool TParametri_ditta::postprocess_config(TMask& mask, TConfig& config)
// MI3262
// La gestione liquidazione differita e' stata spostata sui parametri liquidazione
// ovvero cg5300.cpp
return TRUE;
return true;
}
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;
if (!changed)
return TRUE;
return true;
const TFixed_string v(var);
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');
}
else
return FALSE;
return false;
}
else if (v == "PcTcCm")
{
@ -225,9 +225,9 @@ bool TParametri_ditta::postprocess_config_changed(const char* par, const char* v
}
}
else
return FALSE;
return false;
}
return TRUE;
return true;
}
int cg5100 (int argc, char* argv[])

View File

@ -96,12 +96,12 @@ END
BOOLEAN CHK_GESSAL
BEGIN
PROMPT 4 13 "Gestione saldaconto "
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,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_DTCFPG|DISABLE,CHK_RIFPRO|DISABLE,FLD_CODLIN
MESSAGE FALSE DISABLE,FLD_NUM_EC|DISABLE,FLD_LAST_EC|CLEAR,CHK_EASYSAL
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,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_DTCFPG|DISABLE,CHK_RIFPRO|DISABLE,FLD_CODLIN
MESSAGE false DISABLE,FLD_NUM_EC|DISABLE,FLD_LAST_EC|CLEAR,CHK_EASYSAL
FIELD GesSal
GROUP GROUP_SALDACONTO
END

View File

@ -21,7 +21,7 @@ public:
bool TRiga_array::add_riga(const TRectype& rec_saldi)
{
bool flsca, found = FALSE;
bool flsca, found = false;
int annoes, annoesr;
char flag = ' ', flagr = ' ';
char flagfin = ' ', flagfinr = ' ';
@ -78,7 +78,7 @@ bool TRiga_array::add_riga(const TRectype& rec_saldi)
pdarepror += pdarepro;
paverepror = rec_saldi.get_real(SLD_PAVEREPRO);
paverepror += paverepro;
found = TRUE;
found = true;
r.put(SLD_FLSCA, flsca);
r.put(SLD_ANNOES, annoes);
r.put(SLD_PDARE, pdarer);
@ -121,7 +121,7 @@ protected:
virtual bool user_destroy();
virtual TRelation* get_relation() const { return _rel; }
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 void init_query_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)
{
_anno = 0;
_scarongly = FALSE;
_scarongly = false;
m.disable(DLG_FINDREC);
m.enable(F_DESCR_CONTO);
m.enable(F_ANNO);
@ -180,7 +180,7 @@ bool TSaldibrowse_application::fai_filtro()
int annop = 0;
char tipo;
_saldo_gruppo = _saldo_conto = _saldo_sottoc = FALSE;
_saldo_gruppo = _saldo_conto = _saldo_sottoc = false;
TMask& m = curr_mask();
tipo = m.get(F_TIPOCF)[0];
if (_anno != 0)
@ -198,10 +198,10 @@ bool TSaldibrowse_application::fai_filtro()
_s = m.get_long(F_SOTTOC_CLIENTE);
else _s = m.get_long(F_SOTTOC_FORN);
if (_c == 0)
_saldo_gruppo = TRUE;
_saldo_gruppo = true;
else if (_s == 0l)
_saldo_conto = TRUE;
else _saldo_sottoc = TRUE;
_saldo_conto = true;
else _saldo_sottoc = true;
TRectype from (LF_SALDI);
TRectype to (LF_SALDI);
@ -222,7 +222,7 @@ bool TSaldibrowse_application::fai_filtro()
_cur->setregion(from,to);
return TRUE;
return true;
}
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;
}
}
return TRUE;
return true;
}
bool TSaldibrowse_application::flsca_handler(TMask_field& f, KEY key)
{
if (key == K_SPACE)
app()._scarongly = !f.get().blank();
return TRUE;
return true;
}
bool TSaldibrowse_application::sottoc_handler(TMask_field& f, KEY key)
{
bool ok = TRUE;
bool ok = true;
if (key == K_TAB)
{
bool stop = FALSE;
bool stop = false;
TMask& m = f.mask();
int gruppo = m.get_int(F_GRUPPO);
@ -337,7 +337,7 @@ bool TSaldibrowse_application::user_create()
set_search_field(F_GRUPPO);
return TRUE;
return true;
}
bool TSaldibrowse_application::user_destroy()
@ -348,7 +348,7 @@ bool TSaldibrowse_application::user_destroy()
delete _cur;
// delete _esc;
return TRUE;
return true;
}
int TSaldibrowse_application::read(TMask& m)

View File

@ -38,11 +38,11 @@ protected: // Relapp
virtual TRelation* get_relation() const { return _rel; }
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
virtual bool remove() { return TRUE; }
virtual bool protected_record(TRectype&) { return TRUE; }
virtual bool remove() { return true; }
virtual bool protected_record(TRectype&) { return true; }
virtual void init_query_mode(TMask&);
virtual void init_insert_mode(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()));
f.mask().set(F_CODVAL, fr.codice_valuta());
}
return TRUE;
return true;
}
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)
@ -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)
@ -144,7 +144,7 @@ bool TParaliq_app::credres_handler(TMask_field& f, KEY k)
if (id == F_CRED_RES && i != 0 && r == 0.0)
return f.error_box(TR("Impostare anche il credito residuo."));
}
return TRUE;
return true;
}
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);
f.set(r.string());
}
return TRUE;
return true;
}
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
m.set(F_MESE_RES_AL, oldmese);
}
return TRUE;
return true;
}
void TParaliq_app::check_registers(int year)
@ -308,7 +308,7 @@ bool TParaliq_app::user_destroy()
{
delete _rel;
delete _msk;
return TRUE;
return true;
}
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)
{
// Inizializza array delle attività
init_array(m, TRUE);
init_array(m, true);
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];
int err = NOERR;
bool was = FALSE;
bool was = false;
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);
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();
for (cur = 0L; cur.pos() < items; ++cur)
{

View File

@ -107,8 +107,8 @@ BOOLEAN F_GESIC
BEGIN
PROMPT 4 7 "Gestione IVA per cassa"
FIELD B5
MESSAGE FALSE DISABLE,F_ICDAL|DISABLE,F_ICAL
MESSAGE TRUE ENABLE,F_ICDAL|ENABLE,F_ICAL
MESSAGE false DISABLE,F_ICDAL|DISABLE,F_ICAL
MESSAGE true ENABLE,F_ICDAL|ENABLE,F_ICAL
MODULE IC
END

View File

@ -32,7 +32,7 @@ bool TRipristina_stampa::reg_restore(const TString& regist,
{
CHECKD(month > 0 && month < 13, "Mese errato ", month);
bool ok = TRUE;
bool ok = true;
const char * const fieldname = giornale ? MOV_STAMPATO : MOV_REGST;
TRelation rel(LF_MOV);
TLocalisamfile& mov = rel.lfile();
@ -66,7 +66,7 @@ bool TRipristina_stampa::reg_restore(const TString& regist,
const long nitems = cursor.items();
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)
{
@ -137,7 +137,7 @@ bool TRipristina_stampa::inl_restore(const TString& lib, int year, int month)
const TRecnotype items = cur.items();
cur.freeze();
bool ok = FALSE;
bool ok = false;
// Azzera il flag di stampato sugli indici con mese >= month
for (cur = 0L; cur.pos() < items; ++cur)
@ -187,7 +187,7 @@ void TRipristina_stampa::main_loop()
{
long firm = prefix().get_codditta();
const TString4 reg = msk.get(F_REG);
bool giornale = FALSE;
bool giornale = false;
if (_op == restore_reg)
{

View File

@ -66,7 +66,7 @@ protected:
static bool vers_action(TSheet_field& s, int r, KEY k);
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(); }
TArray_sheet* get_ditte_sheet() { return _ditte; }
@ -76,7 +76,7 @@ public:
bool look_lia(long ditta = 0l, int year = 0);
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 write_general(TMask& m);

View File

@ -4,7 +4,7 @@
bool Visliq_app::look_lim(int m)
{
bool ok = FALSE;
bool ok = false;
_lim_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)
// 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; }
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
{
if (month == -1) month = x;

View File

@ -54,7 +54,7 @@ bool TRipristino_liq::ch_year_handler(TMask_field& f, KEY key)
app().build_nomiditte();
app().build_ditte_sheet();
}
return TRUE;
return true;
}
@ -107,7 +107,7 @@ bool TRipristino_liq::create()
build_ditte_sheet();
dispatch_e_menu(BAR_ITEM_ID(1));
return TRUE;
return true;
}
bool TRipristino_liq::destroy()
@ -216,7 +216,7 @@ bool TRipristino_liq::restore_firm(long firm)
zero_cursor("PPA");
zero_cursor("RMB");
zero_cursor("LIM");
return TRUE;
return true;
}

File diff suppressed because it is too large Load Diff

View File

@ -20,6 +20,7 @@
#define F_CD6_2 120
#define F_CD2_5 121
#define F_CD1_5 122
#define F_CD1_1S 151
#define FF_YEAR 101
#define FF_CODDITTA 102

View File

@ -1,11 +1,10 @@
#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
BEGIN
PROMPT 1 1 "Anno "
FLAGS "A"
END
NUMBER F_CODDITTA 5
@ -20,15 +19,11 @@ BEGIN
FLAGS "B"
END
BUTTON DLG_OK 10 2
BEGIN
PROMPT -12 -1 ""
END
ENDPAGE
BUTTON DLG_QUIT 10 2
BEGIN
PROMPT -22 -1 ""
END
TOOLABR "" 0 0 0 2
#include <stdbar.h>
ENDPAGE

View File

@ -13,144 +13,146 @@ ENDPAGE
PAGE "Comunicazione annuale dati IVA" 0 0 0 2
GROUPBOX DLG_NULL 79 4
NUMBER F_YEAR 4
BEGIN
PROMPT 0 0 "@bDitta corrente"
END
NUMBER F_CODDITTA 5
BEGIN
PROMPT 2 1 "Codice "
PROMPT 1 0 "Anno "
FLAGS "D"
END
NUMBER F_CODDITTA 5
BEGIN
PROMPT 12 0 "Rag. Soc. "
FLAGS "HU"
END
STRING F_RAGSOC 50
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"
END
CURRENCY F_CD1_1 18
BEGIN
PROMPT 1 4 "@bCD1 Operazioni attive "
PROMPT 1 1 "@bCD1 Operazioni attive "
FLAGS "D"
END
CURRENCY F_CD1_2 18
BEGIN
PROMPT 1 5 " di cui: operazioni non imponibili "
PROMPT 1 2 " di cui: operazioni non imponibili "
FLAGS "D"
END
CURRENCY F_CD1_3 18
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"
END
CURRENCY F_CD1_4 18
BEGIN
PROMPT 1 7 " cessioni intracomunitarie di beni "
PROMPT 1 5 " cessioni intracomunitarie di beni "
FLAGS "D"
END
CURRENCY F_CD1_5 18
BEGIN
PROMPT 1 8 "di cui: cess. beni strumentali "
PROMPT 1 6 "di cui: cess. beni strumentali "
FLAGS "D"
END
CURRENCY F_CD2_1 18
BEGIN
PROMPT 1 9 "@bCD2 Operazioni passive "
PROMPT 1 7 "@bCD2 Operazioni passive "
FLAGS "D"
END
CURRENCY F_CD2_2 18
BEGIN
PROMPT 1 10 " di cui: operazioni non imponibili "
PROMPT 1 8 " di cui: operazioni non imponibili "
FLAGS "D"
END
CURRENCY F_CD2_3 18
BEGIN
PROMPT 1 11 " operazioni esenti "
PROMPT 1 9 " operazioni esenti "
FLAGS "D"
END
CURRENCY F_CD2_4 18
BEGIN
PROMPT 1 12 " acquisti intracomunitari di beni "
PROMPT 1 10 " acquisti intracomunitari di beni "
FLAGS "D"
END
CURRENCY F_CD2_5 18
BEGIN
PROMPT 1 13 "di cui: acq. beni strumentali "
PROMPT 1 11 "di cui: acq. beni strumentali "
FLAGS "D"
END
TEXT -1
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
CURRENCY F_CD3_1 18
BEGIN
PROMPT 1 15 "CD3 Imponibile "
PROMPT 1 14 "CD3 Imponibile "
FLAGS "D"
END
CURRENCY F_CD3_2 18
BEGIN
PROMPT 52 15 "Imposta "
PROMPT 52 14 "Imposta "
FLAGS "D"
END
TEXT -1
BEGIN
PROMPT 1 16 "@bRottami e altri materiali di recupero "
PROMPT 1 15 "@bRottami e altri materiali di recupero "
END
CURRENCY F_CD3_3 18
BEGIN
PROMPT 1 17 "CD3 Imponibile "
PROMPT 1 16 "CD3 Imponibile "
FLAGS "D"
END
CURRENCY F_CD3_4 18
BEGIN
PROMPT 52 17 "Imposta "
PROMPT 52 16 "Imposta "
FLAGS "D"
END
CURRENCY F_CD4 18
BEGIN
PROMPT 1 19 "CD4 Iva esigibile "
PROMPT 1 18 "CD4 Iva esigibile "
FLAGS "D"
END
CURRENCY F_CD5 18
BEGIN
PROMPT 1 20 "CD5 Iva detraibile "
PROMPT 1 19 "CD5 Iva detraibile "
FLAGS "D"
END
CURRENCY F_CD6_1 18
BEGIN
PROMPT 1 21 "CD6 IVA dovuta "
PROMPT 1 20 "CD6 IVA dovuta "
FLAGS "D"
END
CURRENCY F_CD6_2 18
BEGIN
PROMPT 48 21 "o a credito "
PROMPT 48 20 "o a credito "
FLAGS "D"
END

View File

@ -4,6 +4,7 @@
#include <form.h>
#include <recarray.h>
#include <reprint.h>
#include <sheet.h>
#include <nditte.h>
@ -234,7 +235,6 @@ void TQuadro_VT_iva_mask::read_iva_data()
}
else
warning_box(FR("Risultati liquidazione non presenti o da ricalcolare per l'anno %d."), _sf->get_year());
}
void TQuadro_VT_iva_mask::print_prospect()

View File

@ -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>
<font face="Courier New" size="10" />
<section type="Head" height="3">

View File

@ -522,7 +522,6 @@ real* TRegistro::read_prorata(int anno) const
real* prorata = NULL;
const TRectype& pla = cache().get("%PLA", chiave);
if (!pla.empty())
prorata = new real(pla.get("R8"));
@ -569,7 +568,7 @@ bool TRegistro::update(long protiva, const TDate& datareg)
if (protiva > _rec.get_long("I5"))
{
_rec.put("I5", protiva);
updated = FALSE;
updated = false;
}
if (datareg > _rec.get_date("D2"))
{
@ -927,7 +926,7 @@ int TBill::compare(const TSortable& s) const
// Certified 95%
bool TBill::find()
{
bool ok = FALSE;
bool ok = false;
if ((_tipo != 'C' && _tipo != 'F') || _sottoconto == 0L)
{

View File

@ -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");
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;
}
}

View File

@ -245,7 +245,7 @@ Flags = ""
Item_01 = "Ricezione conti e periodi", "trrice", ""
Item_02 = "Tabella piano dei conti", "ab0 -1", ""
Item_03 = "Tabella periodi di bilancio", "ab0 -0 %pdb", ""
Item_04 = "Copia aggancio piano dei conti", "vcopia", ""
Item_04 = "Copia aggancio piano dei conti", "vcopia", ""
Item_05 = "Calcolo bilanci", "cb0000", ""
[CGMENU_026]
@ -257,6 +257,7 @@ Item_01 = "Con iva indetraibile", "cg3 -6 I", "F"
Item_02 = "Per tipo costo/ricavo", "cg3 -6 C", "F"
Item_03 = "Intracomunitarie", "cg3 -6 N", "F"
Item_04 = "Doppie", "cg3 -7", "F"
Item_05 = "Emesse in Split-Payment", "ba8 -4 cgstsplit.rep", "F"
[CGMENU_027]
Caption = "Gestione acconti IVA"

114
cg/cgstsplit.rep Normal file
View 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="")&#26;&#26;(20.SPLITPAY="X")))&#26;&#26;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
View 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

View File

@ -50,6 +50,7 @@
#define F_PROG 153
#define F_CREDITOR_ID 154
#define F_SEPA_FATT 155
#define F_SEPA_CUC 156
#endif//__CGTBBNP_H

View File

@ -405,7 +405,7 @@ ENDPAGE
PAGE "Parametri Distinte" 0 -1 77 20
GROUPBOX DLG_NULL 78 7
GROUPBOX DLG_NULL 78 8
BEGIN
PROMPT 1 1 "@bParametri distinte SETIF / SEPA"
END
@ -436,9 +436,15 @@ BEGIN
FIELD S4
END
STRING F_SEPA_CUC 8
BEGIN
PROMPT 2 6 "Codice CUC assegnato da CBI "
FIELD S5
END
BOOLEAN F_SEPA_FATT
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
END