Merge branch 'R_10_00' of http://10.65.20.17:7990/scm/campo/campo into R_10_00

This commit is contained in:
Mattia Tollari 2018-11-14 11:49:37 +01:00
commit cea8aebe23
24 changed files with 304 additions and 104 deletions

View File

@ -51,6 +51,9 @@
<EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</EmbedManifest> <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</EmbedManifest>
<EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</EmbedManifest> <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</EmbedManifest>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl> <Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@ -90,6 +93,7 @@
</DataExecutionPrevention> </DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine> <TargetMachine>MachineX86</TargetMachine>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers> <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
<Version>12.0</Version>
</Link> </Link>
<Bscmake> <Bscmake>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>

View File

@ -387,6 +387,9 @@
<ClInclude Include="..\src\m770\77tbca7.h"> <ClInclude Include="..\src\m770\77tbca7.h">
<Filter>Headers</Filter> <Filter>Headers</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\src\cg\cg2103.h">
<Filter>Headers</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ResourceCompile Include="campo.rc" /> <ResourceCompile Include="campo.rc" />

View File

@ -46,7 +46,7 @@
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\exe\</OutDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\exe\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\obj\$(SolutionName)\$(ProjectName)\</IntDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\obj\$(SolutionName)\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest> <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest> <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
<EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</EmbedManifest> <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</EmbedManifest>

View File

@ -46,7 +46,7 @@
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\exe\</OutDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\exe\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\obj\$(SolutionName)\$(ProjectName)\</IntDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\obj\$(SolutionName)\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest> <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest> <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
<EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</EmbedManifest> <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</EmbedManifest>

View File

@ -43,7 +43,7 @@
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\exe\</OutDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\exe\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\obj\$(SolutionName)\$(ProjectName)\</IntDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\obj\$(SolutionName)\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\exe\</OutDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\exe\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\obj\$(SolutionName)\$(ProjectName)\</IntDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\obj\$(SolutionName)\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>

View File

@ -42,7 +42,7 @@
<PropertyGroup> <PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\exe\</OutDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\exe\</OutDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\exe\</OutDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\exe\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\obj\$(SolutionName)\$(ProjectName)\</IntDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\obj\$(SolutionName)\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>

View File

@ -46,7 +46,7 @@
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\exe\</OutDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\exe\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\obj\$(SolutionName)\$(ProjectName)\</IntDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\obj\$(SolutionName)\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</EmbedManifest> <EmbedManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</EmbedManifest>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest> <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest>
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest> <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>

View File

@ -43,7 +43,7 @@
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\exe\</OutDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\exe\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\obj\$(SolutionName)\$(ProjectName)\</IntDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\obj\$(SolutionName)\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\exe\</OutDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\exe\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\obj\$(SolutionName)\$(ProjectName)\</IntDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\obj\$(SolutionName)\$(ProjectName)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>

3
cd/test/770640.txt Normal file
View File

@ -0,0 +1,3 @@
777.exe
Aggiornato il tracciato di invio del quadro ST

28
cd/test/770640a.ini Normal file
View File

@ -0,0 +1,28 @@
[Main]
Demo=0
[777]
File(134) = 777.exe|X
File(139) = 77qst.frm|X
Patch = 640
Versione = 21511200
[7799]
Kill(0) = batbcaf.msk|x
Kill(1) = batbca7.msk|x
Kill(2) = batbent.msk|x
[77]
Data = 31-10-2018
Descrizione = Percipienti (Mod.770)
Dischi = 1
Edit_4 = 770 -3
Moduli = ba
OEM =
Patch = 0640
PostProcess =
PreProcess =
Prezzo(1) =
Prezzo(2) =
Versione = 21511200

BIN
cd/test/770640a1.zip Normal file

Binary file not shown.

10
cd/test/cg0640.txt Normal file
View File

@ -0,0 +1,10 @@
cg2.exe
Corretti errori di calcolo totale documento nel saldaconto
Modificata segnalazione relativi alla data di comeptenza inferiore o UGUALE alla
data di chiusura.
Segnalato da CRPA. Per movimenti configurati come fatture per il saldaconto ma non
IVA
es.
causale IN6 INCASSATO CONTRIBUTO PROGETTO
cercava un campo codice cliente che sulla maschera non c'era.

94
cd/test/cg0640a.ini Normal file
View File

@ -0,0 +1,94 @@
[Main]
Demo=0
[cg1]
Edit_23 = cg2 -0
File(8) = cg2.exe|X
Patch = 640
Versione = 21511200
[cg99]
Kill(0) = bastntb.rep|x
Kill(1) = bastvet.msk|x
Kill(2) = bastpdb.msk|x
Kill(3) = bastmsp.msk|x
Kill(4) = batbarb.msk|x
Kill(5) = bastndo.rep|x
Kill(6) = bastesc.msk|x
Kill(7) = batbvet.msk|x
Kill(8) = bastzon.msk|x
Kill(9) = bastcve.rep|x
Kill(10) = batbivd.msk|x
Kill(11) = batbtit.msk|x
Kill(12) = bastnot.msk|x
Kill(13) = bastcco.msk|x
Kill(14) = batbcco.msk|x
Kill(15) = bastscc.msk|x
Kill(16) = batbleg.msk|x
Kill(17) = batblia.msk|x
Kill(18) = bastpor.msk|x
Kill(19) = batbcam.msk|x
Kill(20) = batbind.msk|x
Kill(21) = bastcco.rep|x
Kill(22) = batbntb.msk|x
Kill(23) = bastpor.rep|x
Kill(24) = bastcve.msk|x
Kill(25) = batbesc.msk|x
Kill(26) = bastleg.msk|x
Kill(27) = bastmsp.rep|x
Kill(28) = batbcfi.msk|x
Kill(29) = bastarb.rep|x
Kill(30) = batbins.msk|x
Kill(31) = batblia.msk|x
Kill(32) = batbscc.msk|x
Kill(33) = bastivd.msk|x
Kill(34) = batbnot.msk|x
Kill(35) = bastreg.rep|x
Kill(36) = bastnot.rep|x
Kill(37) = batbpdb.msk|x
Kill(38) = cgtbcon.msk|x
Kill(39) = bastver.rep|x
Kill(40) = bastcfi.msk|x
Kill(41) = bastntb.msk|x
Kill(42) = bastpdb.rep|x
Kill(43) = bastesc.rep|x
Kill(44) = bastdpn.rep|x
Kill(45) = bastarb.msk|x
Kill(46) = bastreg.msk|x
Kill(47) = batbinl.msk|x
Kill(48) = bastivd.rep|x
Kill(49) = bastndo.msk|x
Kill(50) = batbdel.msk|x
Kill(51) = batbmsp.msk|x
Kill(52) = batbreg.msk|x
Kill(53) = bastvet.rep|x
Kill(54) = batblbu.msk|x
Kill(55) = bastcam.msk|x
Kill(56) = bastdpn.msk|x
Kill(57) = batbzon.msk|x
Kill(58) = bastscc.rep|x
Kill(59) = batbdpn.msk|x
Kill(60) = batbver.msk|x
Kill(61) = bastleg.rep|x
Kill(62) = bastzon.rep|x
Kill(63) = batbcve.msk|x
Kill(64) = bastcfi.rep|x
Kill(65) = bastver.msk|x
Kill(66) = batbndo.msk|x
Kill(67) = batbtra.msk|x
Kill(68) = bastcam.rep|x
Kill(69) = batbpor.msk|x
[cg]
Data = 05-11-2018
Descrizione = Contabilita' Generale
Dischi = 1
Moduli = ba
OEM =
Patch = 640
PostProcess = bainst -0 CG
PreProcess =
Prezzo(1) =
Prezzo(2) =
Versione = 21511200

BIN
cd/test/cg0640a1.zip Normal file

Binary file not shown.

4
cd/test/sy0640.txt Normal file
View File

@ -0,0 +1,4 @@
xvaga.dll
Aggiunto parametro per non mettersi in copia conoscenza nascosta durante l'invio di una powermail

21
cd/test/sy0640a.ini Normal file
View File

@ -0,0 +1,21 @@
[Main]
Demo=0
[sy1]
File(56) = xvaga.dll|X
Patch = 0640
Versione = 21511200
[sy]
Data = 30-10-2018
Descrizione = Sistema
Dischi = 1
Moduli =
OEM =
Patch = 640
PostProcess =
PreProcess =
Prezzo(1) =
Prezzo(2) =
Versione = 21511200

BIN
cd/test/sy0640a1.zip Normal file

Binary file not shown.

View File

@ -509,7 +509,7 @@ real TPrimanota_application::calcola_saldo() const
if (pag) if (pag)
{ {
const char tipo = row_type(*r); const char tipo = row_type(*r);
if (strchr("ACGKP", tipo) != NULL) // Abbuoni attivi, differenze cambio, spese, ... if (strchr("GK", tipo) != NULL) // Abbuoni attivi, differenze cambio, spese, ... // (A o P) Abbuoni e (C) Differenze cambio perchè c'erano ? non (T) totolae documento perchè pagamento
saldaconto += importo; saldaconto += importo;
} }
} }
@ -580,7 +580,10 @@ HIDDEN bool imptot_error(const TImporto& imptot, const TImporto& impsal, bool va
msg << TR("\nSi desidera correggere il totale documento?"); msg << TR("\nSi desidera correggere il totale documento?");
ok = a.cgs().yesno_box(msg); ok = a.cgs().yesno_box(msg);
if (ok) if (ok)
{
m.set(F_TOTALE, cassa.valore()); m.set(F_TOTALE, cassa.valore());
a.calcola_saldo();
}
} }
return ok; return ok;
} }
@ -671,7 +674,8 @@ bool TPrimanota_application::cg_handler(TMask_field& f, KEY k)
} }
} }
if (errato)
if (errato)
{ {
TString msg(128); TString msg(128);
const TCurrency euro(speso.valore()); const TCurrency euro(speso.valore());
@ -699,7 +703,7 @@ bool TPrimanota_application::cg_handler(TMask_field& f, KEY k)
return false; return false;
} }
} }
if (strchr("ACGKPT", tipo) != NULL) if (strchr("GKT", tipo) != NULL) // Abbuoni attivi, differenze cambio, spese, ... // (A o P) Abbuoni e (C) Differenze cambio perchè c'erano ?
{ {
saldaconto += importo; saldaconto += importo;
if (in_valuta) if (in_valuta)
@ -2497,12 +2501,19 @@ bool TPrimanota_application::datacomp_handler(TMask_field& f, KEY key)
} }
const TDate chiusura = app()._esercizi[ae].chiusura(); const TDate chiusura = app()._esercizi[ae].chiusura();
if (chiusura.ok() && dc <= chiusura) if (chiusura.ok() && dc < chiusura)
{ {
f.error_box(FR("%s è antecedente al %s,\ndata di chiusura dell'esercizio %d"), f.error_box(FR("%s è antecedente al %s,\ndata di chiusura dell'esercizio %d"),
data, chiusura.stringa(), ae); data, chiusura.stringa(), ae);
// Errore non bloccante // Errore non bloccante
} }
else
if (chiusura.ok() && dc == chiusura)
{
f.error_box(FR("%s è uguale al %s,\ndata di chiusura dell'esercizio %d"),
data, chiusura.stringa(), ae);
// Errore non bloccante
}
} }
else else
@ -3150,9 +3161,10 @@ const TString & TPrimanota_application::clifo() const
bool TPrimanota_application::is_split_payment() const bool TPrimanota_application::is_split_payment() const
{ {
const TMask& m = curr_mask(); const TMask& m = curr_mask();
char s = ' '; char s = ' ';
TMask_field* sp = m.find_by_id(F_SPLITPAY); TMask_field* sp = m.find_by_id(F_SPLITPAY);
if (sp != NULL) if (sp != NULL)
{ {
if (sp->shown()) if (sp->shown())
@ -3163,7 +3175,9 @@ bool TPrimanota_application::is_split_payment() const
if (s != 'N' && s != 'S') if (s != 'N' && s != 'S')
{ {
s = 'N'; s = 'N';
if (clifo() == "C" && m.get_int(F_ANNOIVA) >= 2015 && !causale().reverse_charge()) if (iva() == nessuna_iva)
return false;
if (clifo() == "C" && m.get_int(F_ANNOIVA) >= 2015 && !causale().reverse_charge())
{ {
const TRectype& cliente = cache().get_rec(LF_CLIFO, "C", m.get(F_CODCLIFOR)); const TRectype& cliente = cache().get_rec(LF_CLIFO, "C", m.get(F_CODCLIFOR));
if (cliente.get_bool(CLI_SPLITPAY)) if (cliente.get_bool(CLI_SPLITPAY))
@ -3287,17 +3301,50 @@ bool TPrimanota_application::totdoc_handler(TMask_field& f, KEY key)
if (a.is_pagamento()) if (a.is_pagamento())
a.calcola_saldo(); a.calcola_saldo();
} }
} }
if (key == K_TAB && a.is_pagamento() && !a._as400)
{
m.show(K_RESIDUO, f.get().full());
m.show(K_TOTALE, f.get().full());
if (key == K_ENTER) }
{
const TCurrency totale(real(f.get())); if (key == K_ENTER)
if (totale.get_num().is_zero()) {
if (a.is_pagamento()&& ! a._as400)
{
TImporto importo, totdocsc,tot;
TSheet_field& cgrows = a.cgs();
FOR_EACH_SHEET_ROW_BACK(cgrows, i, r)
{
const char tipo = row_type(*r);
if (strchr("GK", tipo) != NULL) // Abbuoni attivi, differenze cambio, spese, ... // (A o P) Abbuoni e (C) Differenze cambio perchè c'erano ? non (T) totolae documento perchè pagamento
{
TImporto importo;
importo = *r;
totdocsc += importo;
}
}
if (tot.valore().is_zero())
{
totdocsc.normalize(a.causale().sezione_clifo());
tot = totdocsc;
f.set(tot.valore().string());
a.calcola_saldo();
}
}
TCurrency totale(real(f.get()));
if (totale.get_num().is_zero())
ok = yesno_box(TR("Totale documento nullo: continuare ugualmente?")); ok = yesno_box(TR("Totale documento nullo: continuare ugualmente?"));
if (ok) if (ok)
{ {
const TValuta cambio(m, SK_VALUTA, SK_DATACAMBIO, SK_CAMBIO); const TValuta cambio(m, SK_VALUTA, SK_DATACAMBIO, SK_CAMBIO);
if (cambio.in_valuta()) if (cambio.in_valuta())
{ {
const real totval(m.get(SK_TOTDOCVAL)); const real totval(m.get(SK_TOTDOCVAL));

View File

@ -34,6 +34,8 @@
#endif #endif
class TDati_mov_auto; class TDati_mov_auto;
enum CGMaskType { _query = 0, _no_iva = 1, _iva = 2, _occas = 3};
class TPrimanota_application : public TRelation_application class TPrimanota_application : public TRelation_application
{ {
TMovimentoPN* _rel; // Relazione principale TMovimentoPN* _rel; // Relazione principale
@ -264,7 +266,6 @@ protected:
void ivas_pack(); void ivas_pack();
void cgs_pack(); void cgs_pack();
bool ci_sono_importi(const TSheet_field& cgs) const; bool ci_sono_importi(const TSheet_field& cgs) const;
real calcola_saldo() const;
real calcola_imp() const; real calcola_imp() const;
void add_cgs_tot(TMask& m); void add_cgs_tot(TMask& m);
@ -324,9 +325,12 @@ public:
static bool iva_notify(TSheet_field& s, int r, KEY key); static bool iva_notify(TSheet_field& s, int r, KEY key);
static bool cg_notify(TSheet_field& s, int r, KEY key); static bool cg_notify(TSheet_field& s, int r, KEY key);
TMask * mask(CGMaskType type) { return _msk[type]; }
void type2colors(char tipor, COLOR& back, COLOR& fore); void type2colors(char tipor, COLOR& back, COLOR& fore);
void set_type_colors(char tipor, COLOR back, COLOR fore); void set_type_colors(char tipor, COLOR back, COLOR fore);
void reset_colors(); void reset_colors();
real calcola_saldo() const;
TCausale& causale() const { return *_causale; } TCausale& causale() const { return *_causale; }
TPartite_array& partite() { return _partite; } // Partite editate TPartite_array& partite() { return _partite; } // Partite editate

View File

@ -256,8 +256,8 @@ void TPay_mask::set_pag(const TRectype& oldpag, const TRiga_scadenze& scad,
const char sez_fat = fatt.sezione(); const char sez_fat = fatt.sezione();
set(S_SEZIONE_SCAD, sez_fat == 'A' ? "A" : "D"); // Sezione della riga set(S_SEZIONE_SCAD, sez_fat == 'A' ? "A" : "D"); // Sezione della riga
if (assigned()) if (assigned())
{ {
set(S_IMPORTO_SCAD, scad.get(SCAD_IMPORTO)); // Importo della rata set(S_IMPORTO_SCAD, scad.get(SCAD_IMPORTO)); // Importo della rata
if (in_valuta) if (in_valuta)
set(S_IMPORTOVAL_SCAD, scad.get(SCAD_IMPORTOVAL)); // Importo in valuta set(S_IMPORTOVAL_SCAD, scad.get(SCAD_IMPORTOVAL)); // Importo in valuta
@ -309,6 +309,16 @@ void TPay_mask::set_pag(const TRectype& oldpag, const TRiga_scadenze& scad,
_pagabile += oldimp; _pagabile += oldimp;
#endif #endif
if (_pagabile.is_zero())
{
hide(S_RESIDUOPAG);
hide(S_RESIDUORATA); // Se non assegnato nascondi residuo rata
}
else
{
show(S_RESIDUOPAG);
show(S_RESIDUORATA); // Se non assegnato nascondi residuo rata
}
// Il flag di saldo/acconto e' attivo solo se non ci sono acconti, cioe': // Il flag di saldo/acconto e' attivo solo se non ci sono acconti, cioe':
// pagamento non assegnato o con data documento antecedente quella della fattura // pagamento non assegnato o con data documento antecedente quella della fattura
@ -333,7 +343,7 @@ void TPay_mask::set_pag(const TRectype& oldpag, const TRiga_scadenze& scad,
#else #else
set_handler(S_GRUPPO, conto_handler); set_handler(S_GRUPPO, conto_handler);
set_handler(S_CONTO, conto_handler); set_handler(S_CONTO, conto_handler);
const bool mostra_conto = !sum.is_nota_credito() && app().curr_mask().get_real(F_TOTALE) != ZERO; const bool mostra_conto = !sum.is_nota_credito(); // && app().curr_mask().get_real(F_TOTALE) != ZERO;
show(-2, mostra_conto); // mostra/nasconde conto contropartita show(-2, mostra_conto); // mostra/nasconde conto contropartita
if (!mostra_conto) if (!mostra_conto)
reset(-2); reset(-2);
@ -1032,7 +1042,9 @@ bool TGame_mask::partite_notify(TSheet_field& partite, int r, KEY k)
if (pag.get_char(PAGSCA_ACCSAL) == 'S') if (pag.get_char(PAGSCA_ACCSAL) == 'S')
{ {
const TImporto abb(sez, pag.get_real(PAGSCA_ABBUONI)); const TImporto abb(sez, pag.get_real(PAGSCA_ABBUONI));
if (!abb.is_zero()) bool is_totdoc = app().mask(_no_iva)->get(F_TOTALE).full();
if (!abb.is_zero())
{ {
const char tipo_abb = pag.get_char(PAGSCA_PASSATT); const char tipo_abb = pag.get_char(PAGSCA_PASSATT);
TToken_string& rabb = gm.add_colored_row(sheet, tipo_abb); TToken_string& rabb = gm.add_colored_row(sheet, tipo_abb);
@ -1040,13 +1052,18 @@ bool TGame_mask::partite_notify(TSheet_field& partite, int r, KEY k)
if (in_valuta) if (in_valuta)
{ {
TImporto abb_lit = abb; TImporto abb_lit = abb;
prima_valuta.val2eur(abb_lit); prima_valuta.val2eur(abb_lit);
gm.add_importo(rabb, abb_lit); if (is_totdoc)
gm.add_importo(rabb, abb, prima_valuta.codice()); {
gm.add_importo(rabb, abb_lit);
gm.add_importo(rabb, abb, prima_valuta.codice());
}
} }
else else
{ {
gm.add_importo(rabb, abb); if (is_totdoc)
gm.add_importo(rabb, abb);
rabb.add(""); rabb.add("");
} }
rabb.add((int)sum.tipo(), 11); rabb.add((int)sum.tipo(), 11);
@ -1060,7 +1077,8 @@ bool TGame_mask::partite_notify(TSheet_field& partite, int r, KEY k)
{ {
TToken_string& rdiff = gm.add_colored_row(sheet, 'C'); TToken_string& rdiff = gm.add_colored_row(sheet, 'C');
rdiff.add(TR("Differenza cambio"), 4); rdiff.add(TR("Differenza cambio"), 4);
gm.add_importo(rdiff, diff); if (is_totdoc)
gm.add_importo(rdiff, diff);
rdiff.add((int)sum.tipo(), 11); rdiff.add((int)sum.tipo(), 11);
} }
} }
@ -1152,6 +1170,8 @@ bool TGame_mask::partite_notify(TSheet_field& partite, int r, KEY k)
if (pag.get_char(PAGSCA_ACCSAL) == 'S' || !pag.get_real(PAGSCA_ABBUONI).is_zero()) if (pag.get_char(PAGSCA_ACCSAL) == 'S' || !pag.get_real(PAGSCA_ABBUONI).is_zero())
{ {
const TImporto abb(sez, pag.get_real(PAGSCA_ABBUONI)); const TImporto abb(sez, pag.get_real(PAGSCA_ABBUONI));
bool is_totdoc = app().mask(_no_iva)->get(F_TOTALE).full();
if (!abb.is_zero()) if (!abb.is_zero())
{ {
const char tipo_abb = pag.get_char(PAGSCA_PASSATT); const char tipo_abb = pag.get_char(PAGSCA_PASSATT);
@ -1161,34 +1181,23 @@ bool TGame_mask::partite_notify(TSheet_field& partite, int r, KEY k)
{ {
TImporto abb_lit = abb; TImporto abb_lit = abb;
prima_valuta.val2eur(abb_lit); prima_valuta.val2eur(abb_lit);
gm.add_importo(rabb, abb_lit); if (is_totdoc)
gm.add_importo(rabb, abb, prima_valuta.codice()); {
gm.add_importo(rabb, abb_lit);
gm.add_importo(rabb, abb, prima_valuta.codice());
}
tot_lit += abb_lit; tot_lit += abb_lit;
tot_val += abb; tot_val += abb;
} }
else else
{ {
gm.add_importo(rabb, abb); if (is_totdoc)
gm.add_importo(rabb, abb);
rabb.add(""); rabb.add("");
tot_lit += abb; tot_lit += abb;
} }
rabb.add((int)sum.tipo(), 11); rabb.add((int)sum.tipo(), 11);
} }
/* Continuo a ritenre impossibile ... per ora
// Le differenze cambio possono esistere solo in valuta
if (in_valuta)
{
const TImporto diff(sez, pag.get_real(PAGSCA_DIFFCAM));
if (!diff.is_zero())
{
TToken_string& rdiff = gm.add_colored_row(sheet, 'C');
rdiff.add(TR("Differenza cambio"), 4);
gm.add_importo(rdiff, diff);
rdiff.add((int)sum.tipo(), 11);
}
}
*/
} // Il pagamento era a saldo } // Il pagamento era a saldo
} // Fine ciclo non assegnati } // Fine ciclo non assegnati

View File

@ -595,6 +595,15 @@ public:
// @cmember Ritorna l'<p n>-esimo campo da stampare // @cmember Ritorna l'<p n>-esimo campo da stampare
TForm_item& field(int n) const TForm_item& field(int n) const
{ return (TForm_item&)_item[n]; } { return (TForm_item&)_item[n]; }
// @cmember Ritorna il primo campo da stampare
TForm_item* first_field()
{ return (TForm_item *)_item.first_item(); }
// @cmember Ritorna il campo successivo da stampare
TForm_item* succ_field()
{ return (TForm_item *)_item.succ_item(); }
// @cmember Ritorna l'ultimo campo da stampare
TForm_item* last_field()
{ return (TForm_item *)_item.last_item(); }
// @cmember Cerca e ritorna l'<p id>-esimo campo nella sezione // @cmember Cerca e ritorna l'<p id>-esimo campo nella sezione
TForm_item* exist_field(short id) const; TForm_item* exist_field(short id) const;

View File

@ -175,10 +175,11 @@ void TForm770::transfer_section(TPrint_section& body, int rigo,
TString str; TString str;
body.update(); body.update();
for (word f = 0; f < body.fields(); f++) for (TForm_item * f = body.first_field(); f != NULL; f = body.succ_field())
{ {
TForm_item& fi = body.field(f); TForm_item& fi = *f;
str = fi.get(); str.trim();
str = fi.get(); str.trim();
if (fi.shown() && str.not_empty()) if (fi.shown() && str.not_empty())
{ {
basecode = fi.get_special_value("TRASFER"); basecode = fi.get_special_value("TRASFER");
@ -1027,8 +1028,8 @@ bool TTrasferimento770::split(const char* path)
rec.set(6, totale['F'-'A']); // Totale F rec.set(6, totale['F'-'A']); // Totale F
rec.set(7, totale['G'-'A']); // Totale G rec.set(7, totale['G'-'A']); // Totale G
rec.set(8, totale['H'-'A']); // Totale H rec.set(8, totale['H'-'A']); // Totale H
rec.set(9, totale['I'-'A']); // Totale I // rec.set(9, totale['I'-'A']); // Totale I
rec.set(10,totale['J'-'A']); // Totale J // rec.set(10,totale['J'-'A']); // Totale J
// Scrive record di coda // Scrive record di coda
outfile << rec; outfile << rec;

View File

@ -32,43 +32,20 @@ BEGIN
PROMPT 79 2 "" PROMPT 79 2 ""
FIELD QLRITEFF FIELD QLRITEFF
SPECIAL STRINGA TRASFER "ST002002" "NP" SPECIAL STRINGA TRASFER "ST002002" "NP"
END End
VALUTA 3
BEGIN
KEY "CREDITI RECUPERATI"
PROMPT 79 2 ""
FIELD QLRITCOMP
SPECIAL STRINGA TRASFER "ST002003" "NP"
END
VALUTA 4
BEGIN
KEY "IMPORTI A SCOMPUTO"
PROMPT 79 2 ""
SPECIAL STRINGA TRASFER "ST002004" "NP"
END
VALUTA 5
BEGIN
KEY "VERSAMENTI IN ECCESSO"
PROMPT 79 2 ""
FIELD QLRITVEREC
SPECIAL STRINGA TRASFER "ST002005" "NP"
END
VALUTA 6 VALUTA 6
BEGIN BEGIN
KEY "CREDITI D'IMPOSTA UTILIZZATI A SCOMPUTO" KEY "CREDITI D'IMPOSTA UTILIZZATI A SCOMPUTO"
PROMPT 79 2 "" PROMPT 79 2 ""
SPECIAL STRINGA TRASFER "ST002004" "NP" SPECIAL STRINGA TRASFER "ST002006" "NP"
END END
VALUTA 7 VALUTA 7
BEGIN BEGIN
KEY "IMPORTO VERSATO" KEY "IMPORTO VERSATO"
PROMPT 79 2 "" PROMPT 79 2 ""
MESSAGE _NUMEXPR,#2-#3-#4-#5-#6 MESSAGE _NUMEXPR,#2-#6
SPECIAL STRINGA TRASFER "ST002007" "NP" SPECIAL STRINGA TRASFER "ST002007" "NP"
END END
@ -100,31 +77,14 @@ BEGIN
PROMPT 79 2 "" PROMPT 79 2 ""
FIELD QLCT FIELD QLCT
SPECIAL STRINGA TRASFER "ST002011" "AN" SPECIAL STRINGA TRASFER "ST002011" "AN"
END End
LISTA 100
BEGIN
KEY "Tesoreria"
PROMPT 79 2 ""
FIELD QLLV
ITEM " | " MESSAGE " ",10
ITEM "C| " MESSAGE " ",10
ITEM "T|X" MESSAGE "X",10
END
NUMERO 12
BEGIN
KEY "Tesoreria"
PROMPT 79 2 ""
SPECIAL STRINGA TRASFER "ST002012" "CB"
END
NUMERO 13 NUMERO 13
BEGIN BEGIN
KEY "Regione" KEY "Regione"
PROMPT 79 2 "" PROMPT 79 2 ""
FIELD QLREGIONE FIELD QLREGIONE
END End
STRINGA 14 STRINGA 14
BEGIN BEGIN

View File

@ -84,8 +84,11 @@ void TImporta_comm_app::scan_file(const TFilename& file, TAssoc_array& righe)
TString16 idlavoro = rec.get(0); idlavoro.strip("\""); TString16 idlavoro = rec.get(0); idlavoro.strip("\"");
//salto le righe vuote del file //salto le righe vuote del file
if (idlavoro.empty()) if (idlavoro.empty())
continue; {
rec = s.line();
continue;
}
//recupero i dati di interesse dal file; //recupero i dati di interesse dal file;
//gruppo conto e sottoconto devono avere dei valori sensati //gruppo conto e sottoconto devono avere dei valori sensati