Merge branch 'R_10_00' of http://10.65.20.33/sirio/CAMPO/campo into R_10_00

This commit is contained in:
Simone Palacino 2019-03-12 18:04:54 +01:00
commit 5def34ebf3
11 changed files with 214 additions and 32 deletions

View File

@ -195,9 +195,8 @@
<ClCompile Include="..\src\fp\fp0300.cpp" />
<ClCompile Include="..\src\fp\fp0400.cpp" />
<ClCompile Include="..\src\fp\fp0500.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
</ClCompile>
</ItemGroup>
<ItemGroup>
@ -207,7 +206,7 @@
<ClInclude Include="..\src\fp\fp0300a.h" />
<ClInclude Include="..\src\fp\fp0400a.h" />
<ClInclude Include="..\src\fp\fp0500a.h">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</ExcludedFromBuild>
</ClInclude>
</ItemGroup>
<ItemGroup>

View File

@ -1,7 +1,7 @@
fp1100a.msk
fp0.exe
fpmenu.men
fp0.exe
fp1.exe
fp1100a.msk
- Aggiunto programma stampa elenco bolli in fattura
- Data una ripulita al menu fp
- Data una ripulita al menu fp

View File

@ -3,9 +3,9 @@ Demo=0
[fp1]
File(0) = fp0.exe|X
File(6) = fpmenu.men|X
File(7) = fp1.exe|X
File(8) = fp1100a.msk|X
File(6) = fp1.exe|X
File(7) = fp1100a.msk|X
File(8) = fpmenu.men|X
Patch = 728
Versione = 21511200

Binary file not shown.

5
cd/test/ve0728.txt Normal file
View File

@ -0,0 +1,5 @@
ve1.exe
cg0.exe
cgmenu.men
Aggiunta riga valenza fiscale nella stampa del documento

139
cd/test/ve0728a.ini Normal file
View File

@ -0,0 +1,139 @@
[Main]
Demo=0
[ve1]
File(19) = ve1.exe|X
Patch = 728
Versione = 21511200
[ve99]
Kill(0) = batbimb.msk|x
Kill(1) = batbacr.msk|x
Kill(2) = batbums.msk|x
Kill(3) = batbeld.msk|x
Kill(4) = bastnum.msk|x
Kill(5) = basttri.msk|x
Kill(6) = batbfrm.msk|x
Kill(7) = batbcra.msk|x
Kill(8) = bastfrd.rep|x
Kill(9) = bastcra.rep|x
Kill(10) = ve7600a.msk|x
Kill(11) = ve7300a.msk|x
Kill(12) = bastfca.rep|x
Kill(13) = batbspt.msk|x
Kill(14) = basttip.rep|x
Kill(15) = ve7700a.msk|x
Kill(16) = bastimb.msk|x
Kill(17) = baststd.msk|x
Kill(18) = bastfrr.msk|x
Kill(19) = ve7500a.msk|x
Kill(20) = efstbnp.rep|x
Kill(21) = batbtri.msk|x
Kill(22) = batbrfa.msk|x
Kill(23) = batbasf.msk|x
Kill(24) = basteld.rep|x
Kill(25) = bastasf.rep|x
Kill(26) = batbmre.msk|x
Kill(27) = ve7200a.msk|x
Kill(28) = batbfrr.msk|x
Kill(29) = bastrfc.rep|x
Kill(30) = batbprv.msk|x
Kill(31) = bastums.rep|x
Kill(32) = bastcaa.msk|x
Kill(33) = batbgca.msk|x
Kill(34) = bastfca.msk|x
Kill(35) = ve7.exe|x
Kill(36) = ve7400conf.ini|x
Kill(37) = bastctr.msk|x
Kill(38) = bastrfa.rep|x
Kill(39) = bastfrr.rep|x
Kill(40) = batbfrd.msk|x
Kill(41) = ve7200a.frm|x
Kill(42) = bastfrm.rep|x
Kill(43) = batbpro.msk|x
Kill(44) = bastcau.msk|x
Kill(45) = bastums.msk|x
Kill(46) = basteld.msk|x
Kill(47) = batbubi.msk|x
Kill(48) = bastubi.rep|x
Kill(49) = ve7400a.ini|x
Kill(50) = batbtip.msk|x
Kill(51) = basttri.rep|x
Kill(52) = bastimb.rep|x
Kill(53) = basttag.msk|x
Kill(54) = bastasf.msk|x
Kill(55) = bastrfa.msk|x
Kill(56) = batbfid.msk|x
Kill(57) = ve7100a.msk|x
Kill(58) = batbspp.msk|x
Kill(59) = bastrfc.msk|x
Kill(60) = batbctr.msk|x
Kill(61) = bastabe.rep|x
Kill(62) = ve7300a.frm|x
Kill(63) = batbcaa.msk|x
Kill(64) = batbgcg.msk|x
Kill(65) = bastprs.msk|x
Kill(66) = bastubi.msk|x
Kill(67) = bastgmc.msk|x
Kill(68) = batbfsa.msk|x
Kill(69) = batbstd.msk|x
Kill(70) = bastnum.rep|x
Kill(71) = bastgcg.msk|x
Kill(72) = batbtag.msk|x
Kill(73) = batbrfc.msk|x
Kill(74) = batbnum.msk|x
Kill(75) = ve7701a.ini|x
Kill(76) = eftbbnp.msk|x
Kill(77) = bastabe.msk|x
Kill(78) = bastgca.rep|x
Kill(79) = batbbnp.msk|x
Kill(80) = basttag.rep|x
Kill(81) = bastspp.msk|x
Kill(82) = bastctr.rep|x
Kill(83) = batbcau.msk|x
Kill(84) = batbprs.msk|x
Kill(85) = bastcaa.rep|x
Kill(86) = bastcau.rep|x
Kill(87) = bastgca.msk|x
Kill(88) = ve7400a.msk|x
Kill(89) = baststd.rep|x
Kill(90) = batbabe.msk|x
Kill(91) = efstbnp.msk|x
Kill(92) = bastcra.msk|x
Kill(93) = batbgmc.msk|x
Kill(94) = bastfrd.msk|x
Kill(95) = bastbnp.rep|x
Kill(96) = basttip.msk|x
Kill(97) = bastprs.rep|x
Kill(98) = bastspp.rep|x
Kill(99) = batbcld.msk|x
Kill(100) = bastfrm.msk|x
Kill(101) = batbgsa.msk|x
Kill(102) = bastgmc.rep|x
Kill(103) = bastbnp.msk|x
Kill(104) = bastgcg.rep|x
Kill(105) = batbfca.msk|x
[cg9]
Edit_19 = cg0 -0
Edit_20 = cg0 -1
Edit_26 = cg0 -4
Edit_5 = cg0 -5
File(127) = cg0.exe|X
File(173) = cgmenu.men|X
Patch = 716
Versione = 21511200
[ve]
Data = 12-03-2019
Descrizione = Vendite
Dischi = 1
Moduli = ba,cg9,pr9,mg9,sv9,in9,ef9
OEM =
Patch = 728
PostProcess = bainst -0 VE
PreProcess =
Prezzo(1) =
Prezzo(2) =
Versione = 21511200

BIN
cd/test/ve0728a1.zip Normal file

Binary file not shown.

View File

@ -11,7 +11,7 @@ int main(int argc, char** argv)
case 1: rt = fp0200(argc, argv); break; // Inserimento massivo PEC e Cod Sdi clifo
case 2: rt = fp0300(argc, argv); break; // Gestione fatture attive (PAA, Ex Fattura PA)
case 3: rt = fp0400(argc, argv); break; // Monitor fatture passive
//case 4: rt = fp0500(argc, argv); break; // Elenco mancate consegna
case 4: rt = fp0500(argc, argv); break; // Elenco mancate consegna
default: rt = fp0100(argc, argv); break; // Configurazione
}
return rt;

View File

@ -5,6 +5,6 @@ int fp0100(int argc, char* argv[]);
int fp0200(int argc, char* argv[]);
int fp0300(int argc, char* argv[]);
int fp0400(int argc, char* argv[]);
//int fp0500(int argc, char* argv[]);
int fp0500(int argc, char* argv[]);
#endif

View File

@ -748,8 +748,9 @@ class TDocumento : public TMultiple_rectype // velib03
TString8 _old_agente; // Agente originale
TString8 _old_agente1; // Secondo Agente originale
TRiga_documento * _sconto; // Riga per lo sconto di testata
TRiga_documento * _sconto; // Riga per lo sconto di testata
TRiga_documento * _esenzione; // Riga per l' esenzione iva
TRiga_documento * _valfisc; // Riga di valenza fiscale per fatture 2019+
bool _dirty_deny;
@ -820,7 +821,7 @@ public:
void sort_rows(const char * key);
int physical_rows() const { return body().rows(); }
virtual int rows() const { return physical_rows() + (ha_riga_sconto() ? 1 : 0) + (ha_riga_esenzione() ? 1 : 0); }
virtual int rows() const { return physical_rows() + (ha_riga_sconto() ? 1 : 0) + (ha_riga_esenzione() ? 1 : 0) + (ha_riga_valfisc() ? 1 : 0); }
const TRiga_documento& operator[](int index) const { return (const TRiga_documento&)((TDocumento *)this)->row(index); }
TRiga_documento& operator[](int index) { return (TRiga_documento&)row(index); }
@ -890,9 +891,11 @@ public:
void set_fields(TAuto_variable_rectype & rec);
void update_esenzione();
void set_riga_esenzione();
void set_riga_valfisc();
const TRiga_documento& get_riga_esenzione() const { return *_esenzione; }
bool ha_riga_sconto() const { return _sconto != NULL; }
bool ha_riga_esenzione() const { return _esenzione != NULL; }
bool ha_riga_valfisc() const { return _valfisc != NULL; }
void iva_esente(TString & codiva_es) const;
real spese_incasso(real &imp, int ndec, TTipo_importo netto = _lordo) const ;

View File

@ -250,7 +250,7 @@ void TDocumento::init()
_codcf = new TRecfield(*this, DOC_CODCF);
_cod_occas = new TRecfield(*this, DOC_OCFPI);
_sconto = _esenzione = NULL;
_sconto = _esenzione = _valfisc = NULL;
_stato_originale = ' ';
_dirty_deny = false;
@ -306,6 +306,7 @@ TDocumento::~TDocumento()
if (_sconto != NULL) delete _sconto;
if (_esenzione != NULL) delete _esenzione;
if (_valfisc != NULL) delete _valfisc;
}
const TString& TDocumento::codiva_spese() const
@ -819,8 +820,11 @@ void TDocumento::on_read(int err, word lockop)
_occas.zero();
set_riga_sconto();
if (is_fattura())
set_riga_esenzione();
if (is_fattura())
{
set_riga_esenzione();
set_riga_valfisc();
}
_stato_originale = stato();
#ifdef LIVE_STATISTICS
@ -1004,15 +1008,15 @@ void TDocumento::set_riga_esenzione()
TString16 v_data_esenzione;
TString16 n_registrazione;
TString16 n_data_registrazione;
bool multiPlaf = c.use_lettere() && get("PLAFOND").full(); // Gestione multiplafond su documento
if (codes.codice().full() && !multiPlaf)
const bool multi_plaf = c.use_lettere() && get("PLAFOND").full(); // Gestione multiplafond su documento
if (codes.codice().full() && !multi_plaf)
{
get_protocolli_esenzione(v_esenzione, v_data_esenzione, n_registrazione, n_data_registrazione);
}
// Tradotto: se ha il cod. esenzione AND (i protocolli pieni OR multiplaf)
bool esente = codes.tipo().not_empty() && ((v_esenzione.not_empty() &&
v_data_esenzione.not_empty() && n_registrazione.not_empty() &&
n_data_registrazione.not_empty()) || multiPlaf);
n_data_registrazione.not_empty()) || multi_plaf);
if (esente)
{
esente = false;
@ -1054,7 +1058,7 @@ void TDocumento::set_riga_esenzione()
_esenzione = new TRiga_documento(this, _tipo_riga_es);
TString d = _des_esenz;
if(multiPlaf)
if(multi_plaf)
{
d << " come dalle vostre dichiarazioni:\n";
TToken_string lePlafs(get("PLAFOND"), ',');
@ -1076,6 +1080,19 @@ void TDocumento::set_riga_esenzione()
_esenzione->set_descr(d);
}
}
void TDocumento::set_riga_valfisc()
{
static TDate anno_fatt_elett = TDate(01, 01, 2019);
if(is_fattura() && tipo().tipo_doc_sdi().full() && data() >= anno_fatt_elett)
{
if (_valfisc == nullptr)
_valfisc = new TRiga_documento(this, "05");
// Uno \n all'inizio per staccarla dal resto, ATTENZIONE!!! Senza lo spazio iniziale scrive solo una parte di questo messaggio!
_valfisc->set_descr(" \nStampa priva di valenza giuridico-fiscale ai sensi dell'art.21 DPR 633/72, salvo per i soggetti non titolari di partita iva e/o non residenti ai sensi del comma 909 art.1 L.205/2017.");
}
}
void TDocumento::dirty_fields()
{
@ -1932,15 +1949,31 @@ TRiga_documento & TDocumento::row(int index)
r = &((TRiga_documento &) b.row(index, FALSE));
}
else
{
CHECKD((index == nrows + 1 && (_sconto != NULL || _esenzione != NULL)) || (index == nrows + 2 && _sconto != NULL && _esenzione != NULL),
"Riga documento non esistente ", index);
if (index == nrows + 1)
{
r = _sconto != NULL ? _sconto : _esenzione;
} else
if (index == nrows + 2)
r = _esenzione;
{
CHECKD(index <= rows(), "Riga documento non esistente ", index);
switch (index - nrows)
{
case 1:
if (_sconto != NULL)
{
r = _sconto;
break;
}
case 2:
if (_esenzione != NULL)
{
r = _esenzione;
break;
}
case 3:
{
r = _valfisc;
break;
}
}
}
return *r;
}
@ -2729,8 +2762,11 @@ TDocumento& TDocumento::copy(const TDocumento & d)
r.set_fields(((TAuto_variable_rectype &)d[i]));
}
set_riga_sconto();
if (is_fattura())
set_riga_esenzione();
if (is_fattura())
{
set_riga_esenzione();
set_riga_valfisc();
}
_occas = d.occas();
return *this;
}