Patch level : 4.0 872
Files correlati : cg0.exe cg2.exe cg3.exe cg4.exe cg5.exe cg6.exe Ricompilazione Demo : [ ] Commento : Prima parte della liquidazione differita git-svn-id: svn://10.65.10.50/trunk@16100 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
98b3c11d88
commit
20c8916d26
@ -33,7 +33,7 @@ class TCaus_app : public TRelation_application
|
||||
TRecord_array * _rcaus_rec;
|
||||
|
||||
// Parametri ditta
|
||||
bool _valuta, _saldaconto;
|
||||
bool _valuta, _saldaconto, _liqdiff;
|
||||
int _anno_iva;
|
||||
tipo_descr _last_descr;
|
||||
|
||||
@ -383,9 +383,9 @@ bool TCaus_app::tipomov_hndl (TMask_field& f, KEY k)
|
||||
bool TCaus_app::mostra_campi()
|
||||
{
|
||||
TMask& m = curr_mask();
|
||||
|
||||
const TString& codreg = m.get(F_COD_REG);
|
||||
if (codreg.empty())
|
||||
|
||||
if (codreg.blank())
|
||||
{
|
||||
m.hide(F_AUTO_FAT);
|
||||
m.hide(F_ALLEGAT);
|
||||
@ -420,7 +420,18 @@ bool TCaus_app::mostra_campi()
|
||||
}
|
||||
else
|
||||
{ // codreg non vuoto
|
||||
m.hide(F_OP_FINE_ANNO);
|
||||
if (_liqdiff)
|
||||
{
|
||||
const TRegistro r(codreg, anno_iva());
|
||||
const bool reg_vendite = r.iva() == iva_vendite && !r.corrispettivi();
|
||||
|
||||
if (!reg_vendite)
|
||||
m.reset(F_LIQDIFF);
|
||||
m.show(F_LIQDIFF, reg_vendite);
|
||||
}
|
||||
else
|
||||
m.reset(F_LIQDIFF);
|
||||
m.hide(F_OP_FINE_ANNO);
|
||||
|
||||
m.enable(F_MOV_VALU, valuta());
|
||||
m.show(F_COD_CAUS_IM);
|
||||
@ -856,7 +867,8 @@ void TCaus_app::on_config_change()
|
||||
TConfig conf(CONFIG_DITTA, "cg");
|
||||
|
||||
_saldaconto = conf.get_bool("GesSal");
|
||||
_valuta = conf.get_bool("GesVal");
|
||||
_valuta = conf.get_bool("GesVal");
|
||||
_liqdiff = conf.get_bool("GesLiqDiff");
|
||||
|
||||
_anno_iva = 0;
|
||||
TTable reg("REG");
|
||||
|
@ -35,6 +35,7 @@
|
||||
#define F_PROVV 132
|
||||
#define F_CODCAUREG 133
|
||||
#define F_REGSPIVA 134
|
||||
#define F_LIQDIFF 135
|
||||
|
||||
#define SS_SEZIONE 102
|
||||
#define SS_TIPOCF 103
|
||||
|
@ -276,24 +276,31 @@ END
|
||||
|
||||
BOOLEAN F_MOV_VALU
|
||||
BEGIN
|
||||
PROMPT 2 12 "Movimento in valuta"
|
||||
PROMPT 2 11 "Movimento in valuta"
|
||||
FIELD MOVVAL
|
||||
GROUP 2
|
||||
END
|
||||
|
||||
BOOLEAN F_SOLAIVA
|
||||
BEGIN
|
||||
PROMPT 34 12 "Movimento di sola IVA"
|
||||
PROMPT 34 11 "Movimento di sola IVA"
|
||||
FIELD SOLOIVA
|
||||
END
|
||||
|
||||
BOOLEAN F_MOV_SEZ
|
||||
BEGIN
|
||||
PROMPT 34 12 "Movimento solo sezionale"
|
||||
PROMPT 34 11 "Movimento solo sezionale"
|
||||
FIELD MOVSEZ
|
||||
FLAGS "H"
|
||||
END
|
||||
|
||||
BOOLEAN F_LIQDIFF
|
||||
BEGIN
|
||||
PROMPT 2 12 "Fattura di vendita a liquidazione differita"
|
||||
FIELD LIQDIFF
|
||||
FLAGS "H"
|
||||
END
|
||||
|
||||
LIST F_PROVV 1 26
|
||||
BEGIN
|
||||
PROMPT 2 13 "Movimento provvisorio "
|
||||
|
@ -287,10 +287,18 @@ bool TPrimanota_application::read_caus(const char* cod, int year)
|
||||
numrif.set_justify(iva == iva_acquisti ? _num_for : _num_cli);
|
||||
numrif.set_trim(!numrif.right_justified());
|
||||
activate_numrif(*m, false);
|
||||
const TCausale & c = causale();
|
||||
|
||||
const bool av = causale().reg().agenzia_viaggi();
|
||||
const bool av = c.reg().agenzia_viaggi();
|
||||
m->show(F_DATA74TER, av);
|
||||
if (!av) m->reset(F_DATA74TER);
|
||||
|
||||
const TRegistro & r = c.reg();
|
||||
|
||||
const bool reg_vendite = r.iva() == iva_vendite && !r.corrispettivi();
|
||||
const bool liqdiff = _liqdiff && c.liqdiff()&& reg_vendite;
|
||||
m->show(F_DATAINC, liqdiff);
|
||||
if (!liqdiff) m->reset(F_DATAINC);
|
||||
|
||||
if (ins)
|
||||
{
|
||||
@ -493,6 +501,7 @@ void TPrimanota_application::on_config_change()
|
||||
_ges_val = cnf.get_bool("GesVal");
|
||||
_ges_sal = cnf.get_bool("GesSal");
|
||||
_npart_is_prot = cnf.get_bool("RifPro");
|
||||
_liqdiff = cnf.get_bool("GesLiqDiff");
|
||||
|
||||
_num_cli = cnf.get_bool("NrCliDx");
|
||||
_num_for = cnf.get_bool("NrForDx");
|
||||
|
@ -62,6 +62,7 @@
|
||||
#define F_ADJUST_PRORATA 146
|
||||
#define F_DATAINTRA 147
|
||||
#define F_ADJUST_IVA 148
|
||||
#define F_DATAINC 149
|
||||
|
||||
#define F_GRUPPO 180
|
||||
#define F_CONTO 181
|
||||
|
@ -534,6 +534,14 @@ BEGIN
|
||||
FIELD DATA74TER
|
||||
END
|
||||
|
||||
DATE F_DATAINC
|
||||
BEGIN
|
||||
PROMPT 52 15 "Data incasso "
|
||||
WARNING "Data di incasso per liquidazione differita"
|
||||
FIELD DATAINC
|
||||
FLAGS "H"
|
||||
END
|
||||
|
||||
NUMBER F_ANNORIF 4
|
||||
BEGIN
|
||||
PROMPT 48 16 "Rif.partita "
|
||||
|
@ -35,6 +35,7 @@ class TPrimanota_application : public TRelation_application
|
||||
|
||||
bool _ges_val, _ges_sal; // Gestione valuta e saldaconto
|
||||
bool _num_cli, _num_for; // Riferimento partita allineato a destra
|
||||
bool _liqdiff; // Liquidazione differita
|
||||
bool _npart_is_prot; // Riferimento partita = n. prot. IVA anziche' doc
|
||||
|
||||
bool _skip_giornale_check; // Ignora controllo data stampa libro giornale
|
||||
|
@ -132,6 +132,9 @@ bool TCausale::valintra() const
|
||||
bool TCausale::soloiva() const
|
||||
{ return _rec.get_bool(CAU_SOLOIVA); }
|
||||
|
||||
bool TCausale::liqdiff() const
|
||||
{ return _rec.get_bool(CAU_LIQDIFF); }
|
||||
|
||||
int TCausale::regime_speciale() const
|
||||
{ return _rec.get_int(CAU_REGSPIVA); }
|
||||
|
||||
|
@ -38,6 +38,7 @@ public:
|
||||
bool intra() const;
|
||||
bool valintra() const;
|
||||
bool soloiva() const;
|
||||
bool liqdiff() const;
|
||||
char provvisorio() const { return _provvisorio; }
|
||||
const TString& causale_inc_imm() const;
|
||||
const TString& causale_reg_iva() const;
|
||||
|
@ -5,6 +5,10 @@
|
||||
#include <automask.h>
|
||||
#endif
|
||||
|
||||
#ifndef __TREE_H
|
||||
#include <tree.h>
|
||||
#endif
|
||||
|
||||
#ifndef __CGLIB01_H__
|
||||
#include "cglib01.h"
|
||||
#endif
|
||||
|
@ -1810,7 +1810,8 @@ bool TListaMov_application::segnala_errori_ogniriga()
|
||||
bool TListaMov_application::segnala_errori_iva()
|
||||
{
|
||||
TLocalisamfile& rmoviva = current_cursor()->file(LF_RMOVIVA);
|
||||
|
||||
const TRectype& mv = current_cursor()->curr(LF_RMOV);
|
||||
|
||||
if (current_cursor()->is_first_match(LF_RMOVIVA))
|
||||
{
|
||||
const TRecnotype nrec = rmoviva.recno();
|
||||
@ -1831,7 +1832,7 @@ bool TListaMov_application::segnala_errori_iva()
|
||||
}
|
||||
const TString4 cod = rec.get(RMI_CODIVA);
|
||||
real percind;
|
||||
const int tipodet = codind2tipodet(rec.get_char(RMI_TIPODET), percind);
|
||||
const int tipodet = get_tipodet_from_rmi(rec, mv, percind);
|
||||
const int tipocr = rec.get_int(RMI_TIPOCR);
|
||||
const TRectype& tab_iva = cache().get("%IVA", cod);
|
||||
if (!tab_iva.empty())
|
||||
|
@ -139,7 +139,7 @@ bool TLista_fatture::filter_func1(const TRelation *r)
|
||||
if (a._tipo == indetraibile)
|
||||
{
|
||||
real percind;
|
||||
const int tipodet = get_tipodet_from_rmi(riv, percind);
|
||||
const int tipodet = get_tipodet_from_rmi(riv, mov, percind);
|
||||
if (tipodet == 0 || percind.is_zero())
|
||||
return false;
|
||||
|
||||
@ -391,10 +391,11 @@ bool TLista_fatture::preprocess_page(int file, int counter)
|
||||
{
|
||||
TCursor* curs = current_cursor();
|
||||
const TRectype& rec = curs->curr();
|
||||
const TRectype& mov = curs->curr(LF_MOV);
|
||||
_ragsoc = curs->curr(LF_CLIFO).get(CLI_RAGSOC);
|
||||
_ragsoc.strip_double_spaces();
|
||||
real percind;
|
||||
const int tipodet = get_tipodet_from_rmi(rec, percind);
|
||||
const int tipodet = get_tipodet_from_rmi(rec, mov, percind);
|
||||
if (_tipo == indetraibile && percind < CENTO)
|
||||
{
|
||||
const int dec = TCurrency::get_firm_dec();
|
||||
@ -435,7 +436,6 @@ bool TLista_fatture::preprocess_page(int file, int counter)
|
||||
_tp_doc = 0.0; _tp_imp = 0.0; _tp_iva = 0.0;
|
||||
}
|
||||
|
||||
const TRectype& mov = curs->curr(LF_MOV);
|
||||
real doc = mov.get_real(MOV_TOTDOC);
|
||||
real imp = rec.get_real(RMI_IMPONIBILE);
|
||||
real iva = rec.get_real(RMI_IMPOSTA);
|
||||
@ -707,7 +707,7 @@ void TLista_fatture::set_page(int file, int counter)
|
||||
else
|
||||
{
|
||||
real percind;
|
||||
const int tipodet = get_tipodet_from_rmi(current_cursor()->curr(), percind);
|
||||
const int tipodet = get_tipodet_from_rmi(current_cursor()->curr(), current_cursor()->curr(LF_MOV), percind);
|
||||
set_row(nriga,"@110g%d", tipodet);
|
||||
}
|
||||
set_row(nriga,"@112g@15n",FLD(LF_RMOVIVA,RMI_IMPOSTA));
|
||||
|
@ -336,6 +336,8 @@ bool TLiquidazione_app::user_create()
|
||||
TRectype to(from);
|
||||
TDate f(1, 1, atoi(_year));
|
||||
TDate t(1, _month == 13 ? 12 : _month, atoi(_year));
|
||||
|
||||
// qui se liquidazione diff. su ditta si parte da year-4 e filtro su anno o data liquid diff sul movim nel periodo
|
||||
t.set_end_month();
|
||||
from.put(MOV_DATAREG, f);
|
||||
to.put(MOV_DATAREG, t);
|
||||
|
@ -848,7 +848,7 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt)
|
||||
// da evitare di dover controllare mese e anno sul PIM
|
||||
const bool was_riv = (tipoiva != "NS") && (tipocr == 1 || tipocr ==5);
|
||||
real percind;
|
||||
const int tipoind = get_tipodet_from_rmi(_rmoviva->curr(), percind);
|
||||
const int tipoind = get_tipodet_from_rmi(_rmoviva->curr(), _mov->curr(), percind);
|
||||
|
||||
const real imponibile_orig = _rmoviva->get_real(RMI_IMPONIBILE);
|
||||
const real imposta_orig = _rmoviva->get_real(RMI_IMPOSTA);
|
||||
@ -1963,7 +1963,7 @@ void TLiquidazione_app::iva11_set_arr_phase_1(const TString& codatt)
|
||||
// A partire dalla versione 3.1 la gestione dell'IVA 11 non viene piu' supportata ...
|
||||
// ... ergo non stiamo a gestire la indetraibilita' parziale
|
||||
real percind;
|
||||
const int tipodet = get_tipodet_from_rmi(_rmoviva->curr(), percind);
|
||||
const int tipodet = get_tipodet_from_rmi(_rmoviva->curr(), _mov->curr(), percind);
|
||||
real imponibile = _rmoviva->get_real(RMI_IMPONIBILE);
|
||||
real imposta = _rmoviva->get_real(RMI_IMPOSTA);
|
||||
const TString4 codiva = _iva->get("CODTAB");
|
||||
|
@ -1294,7 +1294,9 @@ int TStampa_registri_app::stampa_prospetto(int rr, bool print_prec)
|
||||
rr++;
|
||||
set_row(rr, TR("Legenda Tipo Operazione: 1=operazione intracomunitaria 2=AF art.34 comma 3"));
|
||||
if (_auto_intraf)
|
||||
set_row(rr, FR("@78g3=operazione intracomunitaria e AF art.34 comma 3"));
|
||||
set_row(rr, FR("@78g3=operazione intracomunitaria e AF art.34 comma 3 4=Fattura a liquidazione differita"));
|
||||
else
|
||||
set_row(rr, FR("@78g4=Fattura a liquidazione differita"));
|
||||
rr++;
|
||||
|
||||
_stampa = _st_tot_fin;
|
||||
@ -2003,6 +2005,7 @@ bool TStampa_registri_app::preprocess_page(int file, int counter)
|
||||
TString16 codval = mov.get(MOV_CODVALI);
|
||||
real corrval = mov.get_real(MOV_CORRVALUTA);
|
||||
bool autof = caus.get_bool(CAU_AUTOFATT);
|
||||
bool liqdiff = caus.get_bool(CAU_LIQDIFF);
|
||||
TString80 descrcau = caus.get(CAU_DESCR);
|
||||
|
||||
real totdoc = mov.get_real(MOV_TOTDOC);
|
||||
@ -2229,6 +2232,8 @@ bool TStampa_registri_app::preprocess_page(int file, int counter)
|
||||
tipo_op = "1";
|
||||
else if (autof)
|
||||
tipo_op = "2";
|
||||
else if (liqdiff)
|
||||
tipo_op = "4";
|
||||
|
||||
set_row(_r, "@66g%s", (const char*) tipo_op);
|
||||
|
||||
|
@ -62,6 +62,7 @@
|
||||
#define CHK_INTRTR 357
|
||||
#define CHK_DTCFPG 358
|
||||
#define CHK_RIFPRO 359
|
||||
#define CHK_LIQDIF 360
|
||||
|
||||
// gruppi
|
||||
#define GROUP_SALDACONTO 1
|
||||
|
@ -88,6 +88,14 @@ BEGIN
|
||||
GROUP GROUP_CONTABILITA
|
||||
END
|
||||
|
||||
BOOLEAN CHK_LIQDIF
|
||||
BEGIN
|
||||
PROMPT 40 7 "Gestione liquidazione differita"
|
||||
HELP "Indicare se e' attivata anche la gestione della liquidazione differita delle fatture"
|
||||
FIELD GesLiqDiff
|
||||
GROUP GROUP_CONTABILITA
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 76 7
|
||||
BEGIN
|
||||
PROMPT 2 12 "@bParametri saldaconto"
|
||||
|
@ -906,7 +906,7 @@ bool TRic_ListaMov::controlla_riva()
|
||||
//_n_rec = rec.get_int(RMI_ANNOES);
|
||||
codiva = rec.get(RMI_CODIVA);
|
||||
real percind;
|
||||
const int tipodet = get_tipodet_from_rmi(rec, percind);
|
||||
const int tipodet = get_tipodet_from_rmi(rec, current_cursor()->file(LF_MOV).curr(), percind);
|
||||
tipocr = rec.get_int(RMI_TIPOCR);
|
||||
gruppocr = rec.get_int(RMI_GRUPPO);
|
||||
contocr = rec.get_int(RMI_CONTO);
|
||||
@ -2296,7 +2296,7 @@ bool TRic_ListaMov::preprocess_page(int file,int counter)
|
||||
int numrig = rmoviva.get_int(RMI_NUMRIG);
|
||||
_tipocr = rmoviva.get_int(RMI_TIPOCR);
|
||||
real percind;
|
||||
_tipod = get_tipodet_from_rmi(rmoviva, percind);
|
||||
_tipod = get_tipodet_from_rmi(rmoviva, current_cursor()->file(LF_MOV).curr(), percind);
|
||||
_codiva = rmoviva.get(RMI_CODIVA);
|
||||
//_n_rec = cur->curr(LF_RMOVIVA).get_int(RMI_ANNOES);
|
||||
_gruppocr = rmoviva.get_int(RMI_GRUPPO);
|
||||
|
@ -731,7 +731,7 @@ bool TVar_mov::setta_campi_maschera_iva(TMask& m)
|
||||
TString codiva (_tiva->get (RMI_CODIVA));
|
||||
real imposta (_tiva->get_real(RMI_IMPOSTA));
|
||||
real percind;
|
||||
int tipodet = get_tipodet_from_rmi(_tiva->curr(), percind);
|
||||
int tipodet = get_tipodet_from_rmi(_tiva->curr(), *_rec_mov, percind);
|
||||
int tipocr = _tiva->get_int (RMI_TIPOCR);
|
||||
int gruppo = _tiva->get_int (RMI_GRUPPO);
|
||||
int conto = _tiva->get_int (RMI_CONTO);
|
||||
|
@ -1324,7 +1324,9 @@ bool TInv_cont::invio_mov_IVA()
|
||||
record.overwrite(str,43); //Tipo costo/ricavo
|
||||
|
||||
real percind;
|
||||
const int tipodet = get_tipodet_from_rmi(_triva->curr(), percind);
|
||||
const TRectype & mov = cache().get(LF_MOV, nreg);
|
||||
const int tipodet = get_tipodet_from_rmi(_triva->curr(), mov, percind);
|
||||
|
||||
str.format("%01d", tipodet);
|
||||
record.overwrite(str,44); //Tipo detraibilita'
|
||||
|
||||
|
@ -44,14 +44,11 @@ TDate TPagamento::_rata_dfield(int n, int f) const
|
||||
/* Funzione sgradita al nuovo C ed anche a Guy: static bleah!
|
||||
const char* TPagamento::_rata_sfield(int n, int f) const
|
||||
{
|
||||
static char kak[16];
|
||||
TToken_string& t = (TToken_string&)_rate[n];
|
||||
const char* k = t.get(f);
|
||||
if (k != NULL)
|
||||
strncpy(kak, k, 16);
|
||||
else
|
||||
kak[0] = '\0';
|
||||
return kak;
|
||||
TString & s = get_tmp_string(30);
|
||||
|
||||
s = t.get(f);
|
||||
return s;
|
||||
}
|
||||
*/
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
23
|
||||
0
|
||||
$mov|0|0|365|0|Movimenti di prima nota|||
|
||||
$mov|0|0|373|0|Movimenti di prima nota|||
|
||||
|
@ -1,5 +1,5 @@
|
||||
23
|
||||
45
|
||||
46
|
||||
ANNOES|9|4|0|Codice esercizio
|
||||
NUMREG|3|7|0|Numero di operazione
|
||||
DATAREG|5|8|0|Data operazione
|
||||
@ -45,6 +45,7 @@ DPROVV|1|1|0|Documento originale PROVV
|
||||
DANNO|2|4|0|Documento originale ANNO
|
||||
DCODNUM|1|4|0|Documento originale CODNUM
|
||||
DNDOC|3|7|0|Documento originale NDOC
|
||||
DATAINC|5|8|0|Data di incasso per liquidazione differita
|
||||
3
|
||||
NUMREG|
|
||||
DATAREG+NUMREG|
|
||||
|
@ -1,4 +1,3 @@
|
||||
26
|
||||
0
|
||||
$caus|0|0|84|0|Causali contabili|||
|
||||
|
||||
$caus|0|0|85|0|Causali contabili|||
|
||||
|
@ -1,5 +1,5 @@
|
||||
26
|
||||
24
|
||||
25
|
||||
CODCAUS|1|3|0|Codice causale
|
||||
DESCR|1|50|0|Descrizione causale
|
||||
TIPODOC|1|2|0|Tipo documento
|
||||
@ -24,6 +24,7 @@ SOLOIVA|8|1|0|Movimento di sola IVA
|
||||
PROVV|1|1|0|Tipo movimento (" " Normale, "P" Provvisorio cancellabile, "C" Provvisorio da cepiti)
|
||||
REGSPIVA|2|2|0|Regimi speciali IVA
|
||||
CODCAUREG|1|3|0|Causale regolarizzazione IVA
|
||||
LIQDIFF|8|1|0|Fattue a liquidazione differita
|
||||
2
|
||||
CODCAUS|
|
||||
UPPER(DESCR)|X
|
||||
|
Loading…
x
Reference in New Issue
Block a user