Patch level : 12.00 1370
Files correlati : cg0.exe cg0800a.msk cg0900a.msk cg0800a.rep cg0900a.rep cg4.exe cg4b00a.msk cg4c00a.msk cg4b00a.rep cg4c00a.rep cgmenu.men Bug : Commento: Progressivi IVA per attività (registrazione e competenza)
This commit is contained in:
parent
9755381faf
commit
3c1425f34b
@ -13,7 +13,8 @@ int main(int argc, char** argv)
|
|||||||
case 4: cg0500(argc,argv); break; // Causali contabili
|
case 4: cg0500(argc,argv); break; // Causali contabili
|
||||||
case 5: cg0600(argc,argv); break; // Tabelle contabili
|
case 5: cg0600(argc,argv); break; // Tabelle contabili
|
||||||
case 6: cg0700(argc, argv); break; // Clienti/Fornitori occasionali
|
case 6: cg0700(argc, argv); break; // Clienti/Fornitori occasionali
|
||||||
case 7: cg0800(argc, argv); break; // Stampa progressivi IVA avanzata
|
case 7: cg0800(argc, argv); break; // Stampa progressivi IVA avanzata
|
||||||
|
case 8: cg0900(argc, argv); break; // Stampa progressivi IVA avanzata per attività
|
||||||
default: cg0100(argc,argv); break; // Piano dei conti
|
default: cg0100(argc,argv); break; // Piano dei conti
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -9,6 +9,7 @@ int cg0500(int argc, char* argv[]);
|
|||||||
int cg0600(int argc, char* argv[]);
|
int cg0600(int argc, char* argv[]);
|
||||||
int cg0700(int argc, char* argv[]);
|
int cg0700(int argc, char* argv[]);
|
||||||
int cg0800(int argc, char* argv[]);
|
int cg0800(int argc, char* argv[]);
|
||||||
|
int cg0900(int argc, char* argv[]);
|
||||||
|
|
||||||
#endif // __CG0_H
|
#endif // __CG0_H
|
||||||
|
|
||||||
@ -24,4 +25,3 @@ int cg0800(int argc, char* argv[]);
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ void TRiepilogoIVA_app::main_loop()
|
|||||||
while (m.run() != K_QUIT)
|
while (m.run() != K_QUIT)
|
||||||
{
|
{
|
||||||
TRiepilogoIVA_report rep;
|
TRiepilogoIVA_report rep;
|
||||||
TFilename repname = m.get(F_REPORT);
|
TFilename repname = m.get(DLG_REPORT);
|
||||||
TRiepilogoIVA_recordset * recset = new TRiepilogoIVA_recordset;
|
TRiepilogoIVA_recordset * recset = new TRiepilogoIVA_recordset;
|
||||||
|
|
||||||
if (repname.blank())
|
if (repname.blank())
|
||||||
@ -95,10 +95,6 @@ void TRiepilogoIVA_app::main_loop()
|
|||||||
a.set_end_month();
|
a.set_end_month();
|
||||||
recset->set_from(da);
|
recset->set_from(da);
|
||||||
recset->set_to(a);
|
recset->set_to(a);
|
||||||
|
|
||||||
const TString & codatt = m.get(F_CODATT);
|
|
||||||
|
|
||||||
recset->set_codatt(codatt);
|
|
||||||
rep.set_recordset(recset);
|
rep.set_recordset(recset);
|
||||||
rep.print_or_preview();
|
rep.print_or_preview();
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,3 @@
|
|||||||
#define F_ANNO 103
|
#define F_ANNO 103
|
||||||
#define F_DAMESE 104
|
#define F_DAMESE 104
|
||||||
#define F_AMESE 105
|
#define F_AMESE 105
|
||||||
#define F_CODATT 106
|
|
||||||
|
|
||||||
#define F_REPORT 200
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<report libraries="" page_merge="" save_printer="" name="cg0800a" use_printer_font="" orientation="2" page_split="" lpi="6" command="cg0 -7" class="cg0800">
|
<report libraries="" page_merge="" save_printer="" name="cg0800a" use_printer_font="" orientation="2" page_split="" lpi="6" command="cg0 -7" class="cg0800a">
|
||||||
<description>Riepilogo progressivi IVA</description>
|
<description>Riepilogo progressivi IVA</description>
|
||||||
<font face="Arial" size="7" />
|
<font face="Arial" size="7" />
|
||||||
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Head" level="" hidden="" page_break="" can_break="" pattern="1">
|
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Head" level="" hidden="" page_break="" can_break="" pattern="1">
|
||||||
@ -9,7 +9,7 @@
|
|||||||
<field x="48.5" deactivated="" type="Testo" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="4" codval="" id="" pattern="1" hide_zero="" text="Ditta">
|
<field x="48.5" deactivated="" type="Testo" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="4" codval="" id="" pattern="1" hide_zero="" text="Ditta">
|
||||||
<source>#SYSTEM.RAGSOC</source>
|
<source>#SYSTEM.RAGSOC</source>
|
||||||
</field>
|
</field>
|
||||||
<field x="54.5" deactivated="" type="Stringa" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="50" codval="" id="" pattern="1" hide_zero="" text="">
|
<field x="51.5" deactivated="" type="Stringa" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="50" codval="" id="" pattern="1" hide_zero="" text="">
|
||||||
<source>#SYSTEM.RAGSOC</source>
|
<source>#SYSTEM.RAGSOC</source>
|
||||||
</field>
|
</field>
|
||||||
<field x="154" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="4" codval="" id="" pattern="1" hide_zero="" text="Pag.">
|
<field x="154" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="4" codval="" id="" pattern="1" hide_zero="" text="Pag.">
|
||||||
@ -63,13 +63,6 @@
|
|||||||
<li Value="" Code="13" />
|
<li Value="" Code="13" />
|
||||||
</list>
|
</list>
|
||||||
</field>
|
</field>
|
||||||
<field x="103.5" y="1" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="28" codval="" id="" pattern="1" hide_zero="" text="Codice attivit&#E0;">
|
|
||||||
<font face="Courier New" bold="1" size="10" />
|
|
||||||
</field>
|
|
||||||
<field x="126" y="1" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="8" codval="" id="" pattern="1" hide_zero="" text="">
|
|
||||||
<font face="Courier New" bold="1" size="10" />
|
|
||||||
<source>#CODATT</source>
|
|
||||||
</field>
|
|
||||||
<field x="63.5" y="2.25" deactivated="" type="Testo" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="10" codval="" id="" pattern="1" hide_zero="" text="Vendite">
|
<field x="63.5" y="2.25" deactivated="" type="Testo" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="10" codval="" id="" pattern="1" hide_zero="" text="Vendite">
|
||||||
<font face="Arial" size="10" />
|
<font face="Arial" size="10" />
|
||||||
</field>
|
</field>
|
||||||
@ -94,7 +87,7 @@
|
|||||||
<field x="138.5" y="3" deactivated="" type="Testo" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="25" codval="" id="" pattern="1" hide_zero="" text=" Imponibile Imposta">
|
<field x="138.5" y="3" deactivated="" type="Testo" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="25" codval="" id="" pattern="1" hide_zero="" text=" Imponibile Imposta">
|
||||||
<font face="Arial" size="10" />
|
<font face="Arial" size="10" />
|
||||||
</field>
|
</field>
|
||||||
<field border="2" x="4" y="4.75" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" width="160" codval="" height="0" id="" pattern="1" hide_zero="" text="" />
|
<field border="2" y="4.75" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" width="165" codval="" height="0" id="" pattern="1" hide_zero="" text="" />
|
||||||
</section>
|
</section>
|
||||||
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Head" level="1" hidden="" page_break="" can_break="" pattern="1" />
|
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Head" level="1" hidden="" page_break="" can_break="" pattern="1" />
|
||||||
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Body" level="" hidden="" page_break="" can_break="" pattern="1" />
|
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Body" level="" hidden="" page_break="" can_break="" pattern="1" />
|
||||||
@ -125,22 +118,22 @@
|
|||||||
<postscript description="B1.0 POSTSCRIPT">#THIS @
|
<postscript description="B1.0 POSTSCRIPT">#THIS @
|
||||||
#F1.105 +!</postscript>
|
#F1.105 +!</postscript>
|
||||||
</field>
|
</field>
|
||||||
<field x="109.5" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="" pattern="1" hide_zero="1" text="###.###.###,@@">
|
<field x="109" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
<source>IMPACQ</source>
|
<source>IMPACQ</source>
|
||||||
<postscript description="B1.0 POSTSCRIPT">#THIS @
|
<postscript description="B1.0 POSTSCRIPT">#THIS @
|
||||||
#F1.106 +!</postscript>
|
#F1.106 +!</postscript>
|
||||||
</field>
|
</field>
|
||||||
<field x="123" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="" pattern="1" hide_zero="1" text="###.###.###,@@">
|
<field x="122.5" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
<source>IVAACQ</source>
|
<source>IVAACQ</source>
|
||||||
<postscript description="B1.0 POSTSCRIPT">#THIS @
|
<postscript description="B1.0 POSTSCRIPT">#THIS @
|
||||||
#F1.107 +!</postscript>
|
#F1.107 +!</postscript>
|
||||||
</field>
|
</field>
|
||||||
<field x="137" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="" pattern="1" hide_zero="1" text="###.###.###,@@">
|
<field x="136" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
<source>IMPACQIND</source>
|
<source>IMPACQIND</source>
|
||||||
<postscript description="B1.0 POSTSCRIPT">#THIS @
|
<postscript description="B1.0 POSTSCRIPT">#THIS @
|
||||||
#F1.108 +!</postscript>
|
#F1.108 +!</postscript>
|
||||||
</field>
|
</field>
|
||||||
<field x="150.5" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="" pattern="1" hide_zero="1" text="###.###.###,@@">
|
<field x="149.5" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
<source>IVAACQIND</source>
|
<source>IVAACQIND</source>
|
||||||
<postscript description="B1.0 POSTSCRIPT">#THIS @
|
<postscript description="B1.0 POSTSCRIPT">#THIS @
|
||||||
#F1.109 +!</postscript>
|
#F1.109 +!</postscript>
|
||||||
@ -148,17 +141,17 @@
|
|||||||
</section>
|
</section>
|
||||||
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Foot" level="" hidden="" page_break="" can_break="" pattern="1" />
|
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Foot" level="" hidden="" page_break="" can_break="" pattern="1" />
|
||||||
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Foot" level="1" hidden="" page_break="" can_break="" pattern="1">
|
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Foot" level="1" hidden="" page_break="" can_break="" pattern="1">
|
||||||
<field border="2" x="4" y="0.5" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" width="160" codval="" height="0" id="" pattern="1" hide_zero="" text="" />
|
<field border="2" y="0.5" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" width="165" codval="" height="0" id="" pattern="1" hide_zero="" text="" />
|
||||||
<field x="9" y="1" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="20" codval="" height="2" id="101" pattern="1" hide_zero="" text="Totale">
|
<field x="9" y="1" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="20" codval="" height="2" id="101" pattern="1" hide_zero="" text="Totale">
|
||||||
<source>DESC</source>
|
<source>DESC</source>
|
||||||
</field>
|
</field>
|
||||||
<field x="54.5" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="102" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
<field x="55" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="102" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
||||||
<field x="68" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="103" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
<field x="68.5" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="103" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
||||||
<field x="82" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="104" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
<field x="82" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="104" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
||||||
<field x="95.5" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="105" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
<field x="95.5" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="105" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
||||||
<field x="109.5" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="106" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
<field x="109" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="106" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
||||||
<field x="123" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="107" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
<field x="122.5" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="107" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
||||||
<field x="137.5" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="108" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
<field x="136.5" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="108" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
||||||
<field x="151" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="109" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
<field x="149.5" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="109" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
||||||
</section>
|
</section>
|
||||||
</report>
|
</report>
|
@ -1,27 +1,15 @@
|
|||||||
#include "cg0800a.h"
|
#include "cg0800a.h"
|
||||||
|
|
||||||
|
#define ALL_EXPORT
|
||||||
|
#define REPORT
|
||||||
|
#define CLASS_NAME "cg0800a"
|
||||||
|
|
||||||
TOOLBAR "topbar" 0 0 0 2
|
TOOLBAR "topbar" 0 0 0 2
|
||||||
|
#include <aprintbar.h>
|
||||||
|
ENDPAGE
|
||||||
|
|
||||||
BUTTON DLG_PRINT 2 2
|
TOOLBAR "bottombar" 0 -3 0 1
|
||||||
BEGIN
|
#include <bprintbar.h>
|
||||||
PROMPT 1 1 "Stampa"
|
|
||||||
PICTURE BMP_PRINT
|
|
||||||
END
|
|
||||||
|
|
||||||
BUTTON DLG_SETPRINT 2 2
|
|
||||||
BEGIN
|
|
||||||
PROMPT 1 1 "Imposta"
|
|
||||||
PICTURE BMP_SETPRINT
|
|
||||||
END
|
|
||||||
|
|
||||||
BUTTON DLG_EDIT 2 2
|
|
||||||
BEGIN
|
|
||||||
PROMPT 1 1 "~Edit"
|
|
||||||
PICTURE BMP_EDIT
|
|
||||||
END
|
|
||||||
|
|
||||||
#include <helpbar.h>
|
|
||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
|
|
||||||
PAGE "Stampa Riepilogo IVA" -1 -1 62 5
|
PAGE "Stampa Riepilogo IVA" -1 -1 62 5
|
||||||
@ -71,33 +59,6 @@ BEGIN
|
|||||||
VALIDATE F_DAMESE<=F_AMESE
|
VALIDATE F_DAMESE<=F_AMESE
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING F_CODATT 5
|
|
||||||
BEGIN
|
|
||||||
PROMPT 2 7 "Codice Attivita'"
|
|
||||||
FLAGS "UZ"
|
|
||||||
USE LF_ATTIV KEY 1
|
|
||||||
INPUT CODDITTA F_CODDITTA SELECT
|
|
||||||
INPUT CODATT F_CODATT
|
|
||||||
DISPLAY "Attivita'" CODATT
|
|
||||||
DISPLAY "Prevalente" ATTPREV
|
|
||||||
DISPLAY " @48" DESCR
|
|
||||||
OUTPUT F_CODATT CODATT
|
|
||||||
WARNING "Attivita' assente"
|
|
||||||
CHECKTYPE NORMAL
|
|
||||||
END
|
|
||||||
|
|
||||||
STRING F_REPORT 256 50
|
|
||||||
BEGIN
|
|
||||||
PROMPT 2 -3 "Tipo di stampa "
|
|
||||||
RSELECT "cg0800"
|
|
||||||
CHECKTYPE NORMAL
|
|
||||||
END
|
|
||||||
|
|
||||||
STRING DLG_PROFILE 256 50
|
|
||||||
BEGIN
|
|
||||||
PROMPT 2 -1 "Profilo "
|
|
||||||
PSELECT
|
|
||||||
END
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
|
|
||||||
ENDMASK
|
ENDMASK
|
||||||
|
126
src/cg/cg0900.cpp
Normal file
126
src/cg/cg0900.cpp
Normal file
@ -0,0 +1,126 @@
|
|||||||
|
#include <applicat.h>
|
||||||
|
#include <automask.h>
|
||||||
|
#include <reprint.h>
|
||||||
|
#include <variant.h>
|
||||||
|
|
||||||
|
#include "cglib.h"
|
||||||
|
#include "cg0900a.h"
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
// TRiepilogoIVAatt_mask
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
class TRiepilogoIVAatt_mask : public TAutomask
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
||||||
|
|
||||||
|
public:
|
||||||
|
TRiepilogoIVAatt_mask() : TAutomask("cg0900a") { }
|
||||||
|
};
|
||||||
|
|
||||||
|
bool TRiepilogoIVAatt_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||||
|
{
|
||||||
|
TRiepilogoIVAatt_mask & m = (TRiepilogoIVAatt_mask &) o.mask();
|
||||||
|
|
||||||
|
switch (o.dlg())
|
||||||
|
{
|
||||||
|
case F_DAMESE:
|
||||||
|
if (e == fe_modify || e == fe_close)
|
||||||
|
{
|
||||||
|
if (atoi(o.get()) > m.get_int(F_AMESE))
|
||||||
|
m.set(F_AMESE, o.get());
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case F_AMESE:
|
||||||
|
if (e == fe_modify || e == fe_close)
|
||||||
|
{
|
||||||
|
if (atoi(o.get()) < m.get_int(F_DAMESE))
|
||||||
|
o.set(m.get(F_DAMESE));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
// TRiepilogoIVAatt_app
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
class TRiepilogoIVAatt_app : public TSkeleton_application
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
virtual void main_loop();
|
||||||
|
};
|
||||||
|
|
||||||
|
void TRiepilogoIVAatt_app::main_loop()
|
||||||
|
{
|
||||||
|
TRiepilogoIVAatt_mask m;
|
||||||
|
|
||||||
|
while (m.run() != K_QUIT)
|
||||||
|
{
|
||||||
|
TRiepilogoIVA_report rep;
|
||||||
|
TFilename repname = m.get(DLG_REPORT);
|
||||||
|
TRiepilogoIVAatt_recordset * recset = new TRiepilogoIVAatt_recordset;
|
||||||
|
|
||||||
|
if (repname.blank())
|
||||||
|
repname = "cg0900a";
|
||||||
|
|
||||||
|
rep.load(repname);
|
||||||
|
if (recset != NULL)
|
||||||
|
{
|
||||||
|
int anno = m.get_int(F_ANNO);
|
||||||
|
int damese = m.get_int(F_DAMESE);
|
||||||
|
int amese = m.get_int(F_AMESE);
|
||||||
|
|
||||||
|
recset->freeze();
|
||||||
|
recset->set_anno(anno);
|
||||||
|
|
||||||
|
if (damese == 13)
|
||||||
|
{
|
||||||
|
damese = 1;
|
||||||
|
amese = 12;
|
||||||
|
recset->set_annual(true);
|
||||||
|
}
|
||||||
|
recset->set_da_mese(damese);
|
||||||
|
recset->set_a_mese(amese);
|
||||||
|
|
||||||
|
const TDate da(1, damese, anno);
|
||||||
|
TDate a(1, amese, anno);
|
||||||
|
|
||||||
|
if (m.get_long(F_DAMESE) == 13)
|
||||||
|
a.addyear();
|
||||||
|
a.set_end_month();
|
||||||
|
recset->set_from(da);
|
||||||
|
recset->set_to(a);
|
||||||
|
|
||||||
|
const TString & codatt = m.get(F_CODATT);
|
||||||
|
|
||||||
|
recset->set_codatt(codatt);
|
||||||
|
rep.set_recordset(recset);
|
||||||
|
if (codatt.full())
|
||||||
|
{
|
||||||
|
TReport_section * f1 = rep.find_section('F', 1);
|
||||||
|
|
||||||
|
if (f1 != nullptr)
|
||||||
|
{
|
||||||
|
const int fields = f1->items();
|
||||||
|
|
||||||
|
for (int i = 0; i < fields; i++)
|
||||||
|
f1->field(i).hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
rep.print_or_preview();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int cg0900(int argc, char* argv[])
|
||||||
|
{
|
||||||
|
TRiepilogoIVAatt_app app;
|
||||||
|
app.run(argc, argv, TR("Stampa progressivi IVA avanzata per attività"));
|
||||||
|
return 0;
|
||||||
|
}
|
7
src/cg/cg0900a.h
Normal file
7
src/cg/cg0900a.h
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#define F_CODDITTA 101
|
||||||
|
#define F_RAGSOC 102
|
||||||
|
#define F_ANNO 103
|
||||||
|
#define F_DAMESE 104
|
||||||
|
#define F_AMESE 105
|
||||||
|
#define F_CODATT 106
|
||||||
|
#define F_DESATT 107
|
214
src/cg/cg0900a.rep
Normal file
214
src/cg/cg0900a.rep
Normal file
@ -0,0 +1,214 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<report libraries="" page_merge="" save_printer="" name="cg0900a" use_printer_font="" orientation="2" page_split="1" lpi="6" command="cg0 -8" class="cg0900a">
|
||||||
|
<description>Riepilogo progressivi IVA per attivita'</description>
|
||||||
|
<font face="Arial" size="7" />
|
||||||
|
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Head" level="" hidden="" page_break="" can_break="" pattern="1">
|
||||||
|
<field x="4" deactivated="" type="Data" hidden="" link="" dynamic_height="" shade_offset="" width="10" codval="" id="" pattern="1" hide_zero="" text="">
|
||||||
|
<source>#SYSTEM.DATE</source>
|
||||||
|
</field>
|
||||||
|
<field x="48.5" deactivated="" type="Testo" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="4" codval="" id="" pattern="1" hide_zero="" text="Ditta">
|
||||||
|
<source>#SYSTEM.RAGSOC</source>
|
||||||
|
</field>
|
||||||
|
<field x="54.5" deactivated="" type="Stringa" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="50" codval="" id="" pattern="1" hide_zero="" text="">
|
||||||
|
<source>#SYSTEM.RAGSOC</source>
|
||||||
|
</field>
|
||||||
|
<field x="154" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="4" codval="" id="" pattern="1" hide_zero="" text="Pag.">
|
||||||
|
<source>#PAGE</source>
|
||||||
|
</field>
|
||||||
|
<field x="158.5" deactivated="" type="Numero" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="5" codval="" id="" pattern="1" hide_zero="" text="">
|
||||||
|
<source>#PAGE</source>
|
||||||
|
</field>
|
||||||
|
<field x="33.5" y="1" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="25" codval="" id="" pattern="1" hide_zero="" text="Progressivi IVA per registro">
|
||||||
|
<font face="Courier New" bold="1" size="10" />
|
||||||
|
</field>
|
||||||
|
<field x="59.5" y="1" deactivated="" type="Numero" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="6" codval="" id="" pattern="1" hide_zero="" text="">
|
||||||
|
<font face="Courier New" bold="1" size="10" />
|
||||||
|
<source>#ANNO</source>
|
||||||
|
</field>
|
||||||
|
<field x="69.5" y="1" deactivated="" type="Array" hidden="" link="" dynamic_height="" shade_offset="" width="16" codval="" id="" pattern="1" hide_zero="" text="">
|
||||||
|
<font face="Courier New" bold="1" size="10" />
|
||||||
|
<source>#DAMESE</source>
|
||||||
|
<list>
|
||||||
|
<li Value="da gennaio" Code="1" />
|
||||||
|
<li Value="da febbraio" Code="2" />
|
||||||
|
<li Value="da marzo" Code="3" />
|
||||||
|
<li Value="da aprile" Code="4" />
|
||||||
|
<li Value="da maggio" Code="5" />
|
||||||
|
<li Value="da giugno" Code="6" />
|
||||||
|
<li Value="da luglio" Code="7" />
|
||||||
|
<li Value="da agosto" Code="8" />
|
||||||
|
<li Value="da settembre" Code="9" />
|
||||||
|
<li Value="da ottobre" Code="10" />
|
||||||
|
<li Value="da novembre" Code="11" />
|
||||||
|
<li Value="da dicembre" Code="12" />
|
||||||
|
<li Value="annuale" Code="13" />
|
||||||
|
</list>
|
||||||
|
</field>
|
||||||
|
<field x="86.5" y="1" deactivated="" type="Array" hidden="" link="" dynamic_height="" shade_offset="" width="16" codval="" id="" pattern="1" hide_zero="" text="">
|
||||||
|
<font face="Courier New" bold="1" size="10" />
|
||||||
|
<source>#AMESE</source>
|
||||||
|
<list>
|
||||||
|
<li Value="a gennaio" Code="1" />
|
||||||
|
<li Value="a febbraio" Code="2" />
|
||||||
|
<li Value="a marzo" Code="3" />
|
||||||
|
<li Value="ad aprile" Code="4" />
|
||||||
|
<li Value="a maggio" Code="5" />
|
||||||
|
<li Value="a giugno" Code="6" />
|
||||||
|
<li Value="a luglio" Code="7" />
|
||||||
|
<li Value="ad agosto" Code="8" />
|
||||||
|
<li Value="a settembre" Code="9" />
|
||||||
|
<li Value="a ottobre" Code="10" />
|
||||||
|
<li Value="a novembre" Code="11" />
|
||||||
|
<li Value="a dicembre" Code="12" />
|
||||||
|
<li Value="" Code="13" />
|
||||||
|
</list>
|
||||||
|
</field>
|
||||||
|
<field x="105" y="1" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="28" codval="" id="" pattern="1" hide_zero="" text="per attivit&#E0;">
|
||||||
|
<font face="Courier New" bold="1" size="10" />
|
||||||
|
</field>
|
||||||
|
<field x="63.5" y="2.25" deactivated="" type="Testo" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="10" codval="" id="" pattern="1" hide_zero="" text="Vendite">
|
||||||
|
<font face="Arial" size="10" />
|
||||||
|
</field>
|
||||||
|
<field x="87.5" y="2.25" deactivated="" type="Testo" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="18" codval="" id="" pattern="1" hide_zero="" text="Corrispettivi">
|
||||||
|
<font face="Arial" size="10" />
|
||||||
|
</field>
|
||||||
|
<field x="119.5" y="2.25" deactivated="" type="Testo" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="12" codval="" id="" pattern="1" hide_zero="" text="Acquisti">
|
||||||
|
<font face="Courier New" size="10" />
|
||||||
|
</field>
|
||||||
|
<field x="141.5" y="2.25" deactivated="" type="Testo" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="20" codval="" id="" pattern="1" hide_zero="" text="Acquisti indetraibili">
|
||||||
|
<font face="Arial" size="10" />
|
||||||
|
</field>
|
||||||
|
<field x="53.5" y="3" deactivated="" type="Testo" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="30" codval="" id="" pattern="1" hide_zero="" text=" Imponibile Imposta">
|
||||||
|
<font face="Arial" size="10" />
|
||||||
|
</field>
|
||||||
|
<field x="81.5" y="3" deactivated="" type="Testo" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="30" codval="" id="" pattern="1" hide_zero="" text=" Imponibile Imposta">
|
||||||
|
<font face="Arial" size="10" />
|
||||||
|
</field>
|
||||||
|
<field x="110" y="3" deactivated="" type="Testo" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="30" codval="" id="" pattern="1" hide_zero="" text=" Imponibile Imposta">
|
||||||
|
<font face="Arial" size="10" />
|
||||||
|
</field>
|
||||||
|
<field x="138.5" y="3" deactivated="" type="Testo" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="25" codval="" id="" pattern="1" hide_zero="" text=" Imponibile Imposta">
|
||||||
|
<font face="Arial" size="10" />
|
||||||
|
</field>
|
||||||
|
<field border="2" y="4.75" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" width="165" codval="" height="0" id="" pattern="1" hide_zero="" text="" />
|
||||||
|
</section>
|
||||||
|
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Head" level="1" hidden="" page_break="" can_break="" pattern="1" />
|
||||||
|
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Head" level="2" hidden="" page_break="" can_break="" pattern="1">
|
||||||
|
<groupby>COD[1,5]</groupby>
|
||||||
|
<field deactivated="" type="Numero" hidden="1" align="right" link="" dynamic_height="" shade_offset="" width="6" codval="" id="99" pattern="1" hide_zero="" text="">
|
||||||
|
<source>#SYSTEM.FIRM</source>
|
||||||
|
</field>
|
||||||
|
<field x="14" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="6" codval="" id="100" pattern="1" hide_zero="" text="">
|
||||||
|
<source>COD[1,5]</source>
|
||||||
|
<postscript description="H2.100 POSTSCRIPT">MESSAGE COPY,F2.100</postscript>
|
||||||
|
</field>
|
||||||
|
<field x="21" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="50" codval="" id="101" pattern="1" hide_zero="" text="">
|
||||||
|
<prescript description="H2.101 PRESCRIPT">MESSAGE ISAMREAD,10,CODDITTA=#99!CODATT=#100,DESCR</prescript>
|
||||||
|
<postscript description="H2.101 POSTSCRIPT">MESSAGE COPY,F2.101</postscript>
|
||||||
|
</field>
|
||||||
|
</section>
|
||||||
|
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Body" level="" hidden="" page_break="" can_break="" pattern="1" />
|
||||||
|
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Body" level="1" hidden="" page_break="" can_break="" pattern="1">
|
||||||
|
<field x="4" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="4" codval="" id="" pattern="1" hide_zero="" text="">
|
||||||
|
<source>COD[6,9]</source>
|
||||||
|
</field>
|
||||||
|
<field x="9" deactivated="" type="Stringa" hidden="" link="" dynamic_height="1" shade_offset="" width="45" codval="" height="2" id="" pattern="1" hide_zero="" text="">
|
||||||
|
<source>DESC</source>
|
||||||
|
</field>
|
||||||
|
<field x="55" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<source>IMPVEN</source>
|
||||||
|
<postscript description="B1.0 POSTSCRIPT">#THIS @
|
||||||
|
#F2.102 +!</postscript>
|
||||||
|
</field>
|
||||||
|
<field x="68.5" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<source>IVAVEN</source>
|
||||||
|
<postscript description="B1.0 POSTSCRIPT">#THIS @
|
||||||
|
#F2.103 +!</postscript>
|
||||||
|
</field>
|
||||||
|
<field x="82" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<source>IMPCORR</source>
|
||||||
|
<postscript description="B1.0 POSTSCRIPT">#THIS @
|
||||||
|
#F2.104 +!</postscript>
|
||||||
|
</field>
|
||||||
|
<field x="95.5" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<source>IVACORR</source>
|
||||||
|
<postscript description="B1.0 POSTSCRIPT">#THIS @
|
||||||
|
#F2.105 +!</postscript>
|
||||||
|
</field>
|
||||||
|
<field x="109.5" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<source>IMPACQ</source>
|
||||||
|
<postscript description="B1.0 POSTSCRIPT">#THIS @
|
||||||
|
#F2.106 +!</postscript>
|
||||||
|
</field>
|
||||||
|
<field x="123" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<source>IVAACQ</source>
|
||||||
|
<postscript description="B1.0 POSTSCRIPT">#THIS @
|
||||||
|
#F2.107 +!</postscript>
|
||||||
|
</field>
|
||||||
|
<field x="137" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<source>IMPACQIND</source>
|
||||||
|
<postscript description="B1.0 POSTSCRIPT">#THIS @
|
||||||
|
#F2.108 +!</postscript>
|
||||||
|
</field>
|
||||||
|
<field x="150.5" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<source>IVAACQIND</source>
|
||||||
|
<postscript description="B1.0 POSTSCRIPT">#THIS @
|
||||||
|
#F2.109 +!</postscript>
|
||||||
|
</field>
|
||||||
|
</section>
|
||||||
|
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Foot" level="" hidden="" page_break="" can_break="" pattern="1" />
|
||||||
|
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Foot" level="1" hidden="" page_break="" can_break="" pattern="1">
|
||||||
|
<field border="2" y="0.5" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" width="165" codval="" height="0" id="" pattern="1" hide_zero="" text="" />
|
||||||
|
<field x="9" y="1" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="20" codval="" height="2" id="101" pattern="1" hide_zero="" text="Totale">
|
||||||
|
<source>DESC</source>
|
||||||
|
</field>
|
||||||
|
<field x="55" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="102" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
||||||
|
<field x="68.5" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="103" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
||||||
|
<field x="82.5" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="104" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
||||||
|
<field x="96" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="105" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
||||||
|
<field x="110" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="106" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
||||||
|
<field x="123.5" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="107" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
||||||
|
<field x="137" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="108" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
||||||
|
<field x="151.5" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="109" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
||||||
|
</section>
|
||||||
|
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Foot" level="2" hidden="" height="4" page_break="" can_break="" pattern="1">
|
||||||
|
<field border="2" y="0.25" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" width="165" codval="" height="0" id="" pattern="1" hide_zero="" text="" />
|
||||||
|
<field x="14" y="0.75" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="6" codval="" id="100" pattern="1" hide_zero="" text="" />
|
||||||
|
<field x="9" y="0.75" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="6" codval="" id="101" pattern="1" hide_zero="" text="Totale">
|
||||||
|
<source>DESC</source>
|
||||||
|
</field>
|
||||||
|
<field x="21" y="0.75" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="33" codval="" height="2" id="101" pattern="1" hide_zero="" text="" />
|
||||||
|
<field x="55" y="0.75" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="102" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<postscript description="F2.102 POSTSCRIPT">#THIS @
|
||||||
|
#F1.102 +!</postscript>
|
||||||
|
</field>
|
||||||
|
<field x="68.5" y="0.75" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="103" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<postscript description="F2.103 POSTSCRIPT">#THIS @
|
||||||
|
#F1.103 +!</postscript>
|
||||||
|
</field>
|
||||||
|
<field x="82.5" y="0.75" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="104" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<postscript description="F2.104 POSTSCRIPT">#THIS @
|
||||||
|
#F1.104 +!</postscript>
|
||||||
|
</field>
|
||||||
|
<field x="96" y="0.75" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="105" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<postscript description="F2.105 POSTSCRIPT">#THIS @
|
||||||
|
#F1.105 +!</postscript>
|
||||||
|
</field>
|
||||||
|
<field x="110" y="0.75" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="106" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<postscript description="F2.106 POSTSCRIPT">#THIS @
|
||||||
|
#F1.106 +!</postscript>
|
||||||
|
</field>
|
||||||
|
<field x="123.5" y="0.75" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="107" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<postscript description="F2.107 POSTSCRIPT">#THIS @
|
||||||
|
#F1.107 +!</postscript>
|
||||||
|
</field>
|
||||||
|
<field x="137" y="0.75" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="108" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<postscript description="F2.108 POSTSCRIPT">#THIS @
|
||||||
|
#F1.108 +!</postscript>
|
||||||
|
</field>
|
||||||
|
<field x="151.5" y="0.75" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="109" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<postscript description="F2.109 POSTSCRIPT">#THIS @
|
||||||
|
#F1.109 +!</postscript>
|
||||||
|
</field>
|
||||||
|
</section>
|
||||||
|
</report>
|
93
src/cg/cg0900a.uml
Normal file
93
src/cg/cg0900a.uml
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
#include "cg0900a.h"
|
||||||
|
|
||||||
|
#define ALL_EXPORT
|
||||||
|
#define REPORT
|
||||||
|
#define CLASS_NAME "cg0900a"
|
||||||
|
|
||||||
|
TOOLBAR "topbar" 0 0 0 2
|
||||||
|
#include <aprintbar.h>
|
||||||
|
ENDPAGE
|
||||||
|
|
||||||
|
TOOLBAR "bottombar" 0 -3 0 1
|
||||||
|
#include <bprintbar.h>
|
||||||
|
ENDPAGE
|
||||||
|
|
||||||
|
PAGE "Stampa Riepilogo IVA per attività" -1 -1 62 5
|
||||||
|
|
||||||
|
GROUPBOX DLG_NULL 74 3
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 0 ""
|
||||||
|
END
|
||||||
|
|
||||||
|
NUMBER F_CODDITTA 5
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 1 "Ditta "
|
||||||
|
FLAGS "FRD"
|
||||||
|
USE LF_NDITTE KEY 1
|
||||||
|
INPUT CODDITTA F_CODDITTA
|
||||||
|
OUTPUT F_RAGSOC RAGSOC
|
||||||
|
CHECKTYPE REQUIRED
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_RAGSOC 50
|
||||||
|
BEGIN
|
||||||
|
PROMPT 15 1 "Ragione "
|
||||||
|
FLAGS "D"
|
||||||
|
END
|
||||||
|
|
||||||
|
NUMBER F_ANNO 4
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 3 "Anno "
|
||||||
|
FLAGS "AP"
|
||||||
|
CHECKTYPE REQUIRED
|
||||||
|
END
|
||||||
|
|
||||||
|
LIST F_DAMESE 20
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 5 "Da mese "
|
||||||
|
ITEM "13|13a liquid."
|
||||||
|
FLAGS "MP"
|
||||||
|
MESSAGE COPY,F_AMESE
|
||||||
|
END
|
||||||
|
|
||||||
|
LIST F_AMESE 20
|
||||||
|
BEGIN
|
||||||
|
PROMPT 35 5 " A mese "
|
||||||
|
ITEM "13|13a liquid."
|
||||||
|
FLAGS "MP"
|
||||||
|
WARINIG "Il mese di inizio non può essere successico al mese di fine"
|
||||||
|
VALIDATE F_DAMESE<=F_AMESE
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_CODATT 5
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 7 "Codice Attivita'"
|
||||||
|
FLAGS "UZ"
|
||||||
|
USE LF_ATTIV KEY 1
|
||||||
|
INPUT CODDITTA F_CODDITTA SELECT
|
||||||
|
INPUT CODATT F_CODATT
|
||||||
|
DISPLAY "Attivita'" CODATT
|
||||||
|
DISPLAY "Prevalente" ATTPREV
|
||||||
|
DISPLAY " @50" DESCR
|
||||||
|
OUTPUT F_CODATT CODATT
|
||||||
|
OUTPUT F_DESATT DESCR
|
||||||
|
WARNING "Attivita' assente"
|
||||||
|
CHECKTYPE NORMAL
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_DESATT 50
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 9 "Codice Attivita'"
|
||||||
|
FLAGS "UZ"
|
||||||
|
USE LF_ATTIV KEY 2
|
||||||
|
INPUT CODDITTA F_CODDITTA SELECT
|
||||||
|
INPUT DESCR F_DESATT
|
||||||
|
DISPLAY " @50" DESCR
|
||||||
|
DISPLAY "Attivita'" CODATT
|
||||||
|
DISPLAY "Prevalente" ATTPREV
|
||||||
|
COPY OUTPUT F_CODATT
|
||||||
|
WARNING "Attivita' assente"
|
||||||
|
CHECKTYPE NORMAL
|
||||||
|
END
|
||||||
|
|
||||||
|
ENDMASK
|
@ -17,6 +17,7 @@ int main(int argc,char** argv)
|
|||||||
case 8: cg4900(argc,argv); break; // Visualizzazione liquidazione acconti
|
case 8: cg4900(argc,argv); break; // Visualizzazione liquidazione acconti
|
||||||
case 9: cg4a00(argc, argv); break; // Gestione Autotrasportatori
|
case 9: cg4a00(argc, argv); break; // Gestione Autotrasportatori
|
||||||
case 10: cg4b00(argc, argv); break; // Stampa progressivi IVA per competenza
|
case 10: cg4b00(argc, argv); break; // Stampa progressivi IVA per competenza
|
||||||
|
case 11: cg4c00(argc, argv); break; // Stampa progressivi IVA per attività/competenza
|
||||||
default: cg4100(argc,argv); break; // Ricalcolo saldi
|
default: cg4100(argc,argv); break; // Ricalcolo saldi
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -12,6 +12,7 @@ int cg4800(int argc, char* argv[]);
|
|||||||
int cg4900(int argc, char* argv[]);
|
int cg4900(int argc, char* argv[]);
|
||||||
int cg4a00(int argc, char* argv[]);
|
int cg4a00(int argc, char* argv[]);
|
||||||
int cg4b00(int argc, char* argv[]);
|
int cg4b00(int argc, char* argv[]);
|
||||||
|
int cg4c00(int argc, char* argv[]);
|
||||||
|
|
||||||
#endif // __CG4_H
|
#endif // __CG4_H
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ void TRiepilogoIVA_app::main_loop()
|
|||||||
while (m.run() != K_QUIT)
|
while (m.run() != K_QUIT)
|
||||||
{
|
{
|
||||||
TRiepilogoIVA_report rep;
|
TRiepilogoIVA_report rep;
|
||||||
TFilename repname = m.get(F_REPORT);
|
TFilename repname = m.get(DLG_REPORT);
|
||||||
TRiepilogoIVAcompetenza_recordset *recset = new TRiepilogoIVAcompetenza_recordset;
|
TRiepilogoIVAcompetenza_recordset *recset = new TRiepilogoIVAcompetenza_recordset;
|
||||||
|
|
||||||
if (repname.blank())
|
if (repname.blank())
|
||||||
@ -122,10 +122,6 @@ void TRiepilogoIVA_app::main_loop()
|
|||||||
recset->set_a_mese(amese);
|
recset->set_a_mese(amese);
|
||||||
recset->set_from(m.get_date(F_DADATA));
|
recset->set_from(m.get_date(F_DADATA));
|
||||||
recset->set_to(m.get_date(F_ADATA));
|
recset->set_to(m.get_date(F_ADATA));
|
||||||
|
|
||||||
const TString & codatt = m.get(F_CODATT);
|
|
||||||
|
|
||||||
recset->set_codatt(codatt);
|
|
||||||
rep.set_recordset(recset);
|
rep.set_recordset(recset);
|
||||||
rep.print_or_preview();
|
rep.print_or_preview();
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,3 @@
|
|||||||
#define F_DADATA 106
|
#define F_DADATA 106
|
||||||
#define F_ADATA 107
|
#define F_ADATA 107
|
||||||
#define F_CODATT 108
|
#define F_CODATT 108
|
||||||
|
|
||||||
#define F_REPORT 200
|
|
||||||
#define F_PROFILO 201
|
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<report libraries="" page_merge="" save_printer="" name="cg4b00a" use_printer_font="" orientation="2" page_split="" lpi="6" command="cg4 -10" class="cg4b00">
|
<report libraries="" page_merge="" save_printer="" name="cg4b00a" use_printer_font="" orientation="2" page_split="" lpi="6" command="cg4 -10" class="cg4b00a">
|
||||||
<description>Riepilogo progressivi IVA per competenza</description>
|
<description>Riepilogo progressivi IVA per competenza</description>
|
||||||
<font face="Arial" size="7" />
|
<font face="Arial" size="7" />
|
||||||
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Head" level="" hidden="" page_break="" can_break="" pattern="1">
|
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Head" level="" hidden="" page_break="" can_break="" pattern="1">
|
||||||
@ -63,13 +63,6 @@
|
|||||||
<li Value="" Code="13" />
|
<li Value="" Code="13" />
|
||||||
</list>
|
</list>
|
||||||
</field>
|
</field>
|
||||||
<field x="103.5" y="1.25" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="28" codval="" id="" pattern="1" hide_zero="" text="Codice attivit&#E0;">
|
|
||||||
<font face="Courier New" bold="1" size="10" />
|
|
||||||
</field>
|
|
||||||
<field x="126" y="1.25" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="8" codval="" id="" pattern="1" hide_zero="" text="">
|
|
||||||
<font face="Courier New" bold="1" size="10" />
|
|
||||||
<source>#CODATT</source>
|
|
||||||
</field>
|
|
||||||
<field x="41" y="2.25" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="35" codval="" id="" pattern="1" hide_zero="" text="Da data di registrazione">
|
<field x="41" y="2.25" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="35" codval="" id="" pattern="1" hide_zero="" text="Da data di registrazione">
|
||||||
<font face="Courier New" bold="1" size="10" />
|
<font face="Courier New" bold="1" size="10" />
|
||||||
</field>
|
</field>
|
||||||
@ -108,7 +101,7 @@
|
|||||||
<field x="137" y="4.25" deactivated="" type="Testo" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="30" codval="" id="" pattern="1" hide_zero="" text=" Imponibile Imposta">
|
<field x="137" y="4.25" deactivated="" type="Testo" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="30" codval="" id="" pattern="1" hide_zero="" text=" Imponibile Imposta">
|
||||||
<font face="Arial" size="10" />
|
<font face="Arial" size="10" />
|
||||||
</field>
|
</field>
|
||||||
<field border="2" x="4" y="5.5" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" width="160" codval="" height="0" id="" pattern="1" hide_zero="" text="" />
|
<field border="2" y="5.5" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" width="165" codval="" height="0" id="" pattern="1" hide_zero="" text="" />
|
||||||
</section>
|
</section>
|
||||||
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Head" level="1" hidden="" page_break="" can_break="" pattern="1" />
|
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Head" level="1" hidden="" page_break="" can_break="" pattern="1" />
|
||||||
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Body" level="" hidden="" page_break="" can_break="" pattern="1" />
|
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Body" level="" hidden="" page_break="" can_break="" pattern="1" />
|
||||||
@ -129,32 +122,32 @@
|
|||||||
<postscript description="B1.0 POSTSCRIPT">#THIS @
|
<postscript description="B1.0 POSTSCRIPT">#THIS @
|
||||||
#F1.103 +!</postscript>
|
#F1.103 +!</postscript>
|
||||||
</field>
|
</field>
|
||||||
<field x="82.5" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="" pattern="1" hide_zero="1" text="###.###.###,@@">
|
<field x="82" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
<source>IMPCORR</source>
|
<source>IMPCORR</source>
|
||||||
<postscript description="B1.0 POSTSCRIPT">#THIS @
|
<postscript description="B1.0 POSTSCRIPT">#THIS @
|
||||||
#F1.104 +!</postscript>
|
#F1.104 +!</postscript>
|
||||||
</field>
|
</field>
|
||||||
<field x="96" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="" pattern="1" hide_zero="1" text="###.###.###,@@">
|
<field x="95.5" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
<source>IVACORR</source>
|
<source>IVACORR</source>
|
||||||
<postscript description="B1.0 POSTSCRIPT">#THIS @
|
<postscript description="B1.0 POSTSCRIPT">#THIS @
|
||||||
#F1.105 +!</postscript>
|
#F1.105 +!</postscript>
|
||||||
</field>
|
</field>
|
||||||
<field x="110" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="" pattern="1" hide_zero="1" text="###.###.###,@@">
|
<field x="109" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
<source>IMPACQ</source>
|
<source>IMPACQ</source>
|
||||||
<postscript description="B1.0 POSTSCRIPT">#THIS @
|
<postscript description="B1.0 POSTSCRIPT">#THIS @
|
||||||
#F1.106 +!</postscript>
|
#F1.106 +!</postscript>
|
||||||
</field>
|
</field>
|
||||||
<field x="123.5" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="" pattern="1" hide_zero="1" text="###.###.###,@@">
|
<field x="122.5" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
<source>IVAACQ</source>
|
<source>IVAACQ</source>
|
||||||
<postscript description="B1.0 POSTSCRIPT">#THIS @
|
<postscript description="B1.0 POSTSCRIPT">#THIS @
|
||||||
#F1.107 +!</postscript>
|
#F1.107 +!</postscript>
|
||||||
</field>
|
</field>
|
||||||
<field x="137.5" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="" pattern="1" hide_zero="1" text="###.###.###,@@">
|
<field x="136" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
<source>IMPACQIND</source>
|
<source>IMPACQIND</source>
|
||||||
<postscript description="B1.0 POSTSCRIPT">#THIS @
|
<postscript description="B1.0 POSTSCRIPT">#THIS @
|
||||||
#F1.108 +!</postscript>
|
#F1.108 +!</postscript>
|
||||||
</field>
|
</field>
|
||||||
<field x="151" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="" pattern="1" hide_zero="1" text="###.###.###,@@">
|
<field x="149.5" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
<source>IVAACQIND</source>
|
<source>IVAACQIND</source>
|
||||||
<postscript description="B1.0 POSTSCRIPT">#THIS @
|
<postscript description="B1.0 POSTSCRIPT">#THIS @
|
||||||
#F1.109 +!</postscript>
|
#F1.109 +!</postscript>
|
||||||
@ -162,17 +155,17 @@
|
|||||||
</section>
|
</section>
|
||||||
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Foot" level="" hidden="" page_break="" can_break="" pattern="1" />
|
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Foot" level="" hidden="" page_break="" can_break="" pattern="1" />
|
||||||
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Foot" level="1" hidden="" page_break="" can_break="" pattern="1">
|
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Foot" level="1" hidden="" page_break="" can_break="" pattern="1">
|
||||||
<field border="2" x="4" y="0.5" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" width="160" codval="" height="0" id="" pattern="1" hide_zero="" text="" />
|
<field border="2" y="0.5" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" width="165" codval="" height="0" id="" pattern="1" hide_zero="" text="" />
|
||||||
<field x="9" y="1" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="20" codval="" height="2" id="101" pattern="1" hide_zero="" text="Totale">
|
<field x="9" y="1" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="20" codval="" height="2" id="101" pattern="1" hide_zero="" text="Totale">
|
||||||
<source>DESC</source>
|
<source>DESC</source>
|
||||||
</field>
|
</field>
|
||||||
<field x="55" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="102" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
<field x="55" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="102" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
||||||
<field x="69" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="103" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
<field x="68.5" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="103" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
||||||
<field x="82.5" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="104" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
<field x="82" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="104" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
||||||
<field x="96.5" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="105" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
<field x="95.5" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="105" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
||||||
<field x="110" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="106" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
<field x="109" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="106" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
||||||
<field x="123.5" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="107" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
<field x="122.5" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="107" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
||||||
<field x="137" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="108" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
<field x="136" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="108" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
||||||
<field x="150.5" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="109" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
<field x="149.5" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="109" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
||||||
</section>
|
</section>
|
||||||
</report>
|
</report>
|
@ -1,29 +1,19 @@
|
|||||||
#include "cg4b00a.h"
|
#include "cg4c00a.h"
|
||||||
|
|
||||||
|
#define ALL_EXPORT
|
||||||
|
#define REPORT
|
||||||
|
#define CLASS_NAME "cg4b00a"
|
||||||
|
|
||||||
TOOLBAR "topbar" 0 0 0 2
|
TOOLBAR "topbar" 0 0 0 2
|
||||||
BUTTON DLG_PRINT 2 2
|
#include <aprintbar.h>
|
||||||
BEGIN
|
ENDPAGE
|
||||||
PROMPT 1 1 "Stampa"
|
|
||||||
PICTURE BMP_PRINT
|
|
||||||
END
|
|
||||||
|
|
||||||
BUTTON DLG_SETPRINT 2 2
|
TOOLBAR "bottombar" 0 -3 0 1
|
||||||
BEGIN
|
#include <bprintbar.h>
|
||||||
PROMPT 1 1 "Imposta"
|
|
||||||
PICTURE BMP_SETPRINT
|
|
||||||
END
|
|
||||||
|
|
||||||
BUTTON DLG_EDIT 2 2
|
|
||||||
BEGIN
|
|
||||||
PROMPT 1 1 "~Edit"
|
|
||||||
PICTURE BMP_EDIT
|
|
||||||
END
|
|
||||||
|
|
||||||
#include <helpbar.h>
|
|
||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
|
|
||||||
PAGE "Stampa" -1 -1 62 5
|
PAGE "Stampa Riepilogo IVA per competenza" -1 -1 62 5
|
||||||
|
|
||||||
GROUPBOX DLG_NULL 74 3
|
GROUPBOX DLG_NULL 74 3
|
||||||
BEGIN
|
BEGIN
|
||||||
@ -70,7 +60,6 @@ BEGIN
|
|||||||
VALIDATE F_DAMESE<=F_AMESE
|
VALIDATE F_DAMESE<=F_AMESE
|
||||||
END
|
END
|
||||||
|
|
||||||
|
|
||||||
DATE F_DADATA
|
DATE F_DADATA
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 7 "Da: data registrazione "
|
PROMPT 2 7 "Da: data registrazione "
|
||||||
@ -79,37 +68,8 @@ END
|
|||||||
DATE F_ADATA
|
DATE F_ADATA
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 9 " A: data registrazione "
|
PROMPT 2 9 " A: data registrazione "
|
||||||
WARINIG "La data di inizio non può essere successico alla data di fine"
|
WARINIG "La data di inizio non può essere successico alla data di fine"
|
||||||
VALIDATE DATE_CMP_FUNC >= F_>ADATA
|
VALIDATE DATE_CMP_FUNC >= F_>ADATA
|
||||||
END
|
|
||||||
|
|
||||||
STRING F_CODATT 5
|
|
||||||
BEGIN
|
|
||||||
PROMPT 2 11 "Codice Attivita'"
|
|
||||||
FLAGS "UZ"
|
|
||||||
USE LF_ATTIV KEY 1
|
|
||||||
INPUT CODDITTA F_CODDITTA SELECT
|
|
||||||
INPUT CODATT F_CODATT
|
|
||||||
DISPLAY "Attivita'" CODATT
|
|
||||||
DISPLAY "Prevalente" ATTPREV
|
|
||||||
DISPLAY " @48" DESCR
|
|
||||||
OUTPUT F_CODATT CODATT
|
|
||||||
WARNING "Attivita' assente"
|
|
||||||
CHECKTYPE NORMAL
|
|
||||||
END
|
|
||||||
|
|
||||||
|
|
||||||
STRING F_REPORT 256 50
|
|
||||||
BEGIN
|
|
||||||
PROMPT 2 -3 "Tipo di stampa "
|
|
||||||
RSELECT "cg4b00"
|
|
||||||
CHECKTYPE NORMAL
|
|
||||||
END
|
|
||||||
|
|
||||||
STRING DLG_PROFILE 256 50
|
|
||||||
BEGIN
|
|
||||||
PROMPT 2 -1 "Profilo "
|
|
||||||
PSELECT
|
|
||||||
END
|
END
|
||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
|
152
src/cg/cg4c00.cpp
Normal file
152
src/cg/cg4c00.cpp
Normal file
@ -0,0 +1,152 @@
|
|||||||
|
#include <applicat.h>
|
||||||
|
#include <automask.h>
|
||||||
|
#include <reprint.h>
|
||||||
|
#include <variant.h>
|
||||||
|
|
||||||
|
#include "cglib.h"
|
||||||
|
#include "cg4c00a.h"
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
// TRiepilogoIVAatt_mask
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
class TRiepilogoIVAatt_mask : public TAutomask
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
||||||
|
|
||||||
|
public:
|
||||||
|
TRiepilogoIVAatt_mask() : TAutomask("cg4c00a") { }
|
||||||
|
};
|
||||||
|
|
||||||
|
bool TRiepilogoIVAatt_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||||
|
{
|
||||||
|
TRiepilogoIVAatt_mask & m = (TRiepilogoIVAatt_mask &)o.mask();
|
||||||
|
|
||||||
|
switch (o.dlg())
|
||||||
|
{
|
||||||
|
case F_DAMESE:
|
||||||
|
if (e == fe_modify || e == fe_close)
|
||||||
|
{
|
||||||
|
if (atoi(o.get()) > m.get_int(F_AMESE))
|
||||||
|
m.set(F_AMESE, o.get());
|
||||||
|
if (e == fe_modify && (atoi(o.get()) == 13))
|
||||||
|
{
|
||||||
|
TDate d(1, 1, m.get_int(F_ANNO));
|
||||||
|
|
||||||
|
m.set(F_DADATA, d);
|
||||||
|
d.set_month(12);
|
||||||
|
d.set_end_month();
|
||||||
|
m.set(F_ADATA, d);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case F_AMESE:
|
||||||
|
if (e == fe_modify || e == fe_close)
|
||||||
|
{
|
||||||
|
if (atoi(o.get()) < m.get_int(F_DAMESE))
|
||||||
|
o.set(m.get(F_DAMESE));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case F_DADATA:
|
||||||
|
if (e == fe_modify || e == fe_close)
|
||||||
|
{
|
||||||
|
if (TDate(o.get()) > m.get_date(F_ADATA))
|
||||||
|
m.set(F_ADATA, o.get());
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case F_ADATA:
|
||||||
|
if (e == fe_modify || e == fe_close)
|
||||||
|
{
|
||||||
|
if (TDate(o.get()) < m.get_date(F_DADATA))
|
||||||
|
o.set(m.get(F_DADATA));
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
// TRiepilogoIVAattcompetenza_recordset
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
class TRiepilogoIVAattcompetenza_recordset : public TRiepilogoIVAatt_recordset
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
virtual bool is_competenza() const { return true; }
|
||||||
|
|
||||||
|
TRiepilogoIVAattcompetenza_recordset() {}
|
||||||
|
virtual ~TRiepilogoIVAattcompetenza_recordset() { }
|
||||||
|
};
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
// TRiepilogoIVAatt_app
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
class TRiepilogoIVAatt_app : public TSkeleton_application
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
virtual void main_loop();
|
||||||
|
};
|
||||||
|
|
||||||
|
void TRiepilogoIVAatt_app::main_loop()
|
||||||
|
{
|
||||||
|
TRiepilogoIVAatt_mask m;
|
||||||
|
|
||||||
|
while (m.run() != K_QUIT)
|
||||||
|
{
|
||||||
|
TRiepilogoIVA_report rep;
|
||||||
|
TFilename repname = m.get(DLG_REPORT);
|
||||||
|
TRiepilogoIVAattcompetenza_recordset *recset = new TRiepilogoIVAattcompetenza_recordset;
|
||||||
|
|
||||||
|
if (repname.blank())
|
||||||
|
repname = "cg4c00a";
|
||||||
|
rep.load(repname);
|
||||||
|
if (recset != NULL)
|
||||||
|
{
|
||||||
|
int anno = m.get_int(F_ANNO);
|
||||||
|
int damese = m.get_int(F_DAMESE);
|
||||||
|
int amese = m.get_int(F_AMESE);
|
||||||
|
|
||||||
|
recset->freeze();
|
||||||
|
if (damese == 13)
|
||||||
|
{
|
||||||
|
damese = 1;
|
||||||
|
amese = 12;
|
||||||
|
recset->set_annual(true);
|
||||||
|
}
|
||||||
|
recset->set_anno(anno);
|
||||||
|
recset->set_da_mese(damese);
|
||||||
|
recset->set_a_mese(amese);
|
||||||
|
recset->set_from(m.get_date(F_DADATA));
|
||||||
|
recset->set_to(m.get_date(F_ADATA));
|
||||||
|
|
||||||
|
const TString & codatt = m.get(F_CODATT);
|
||||||
|
|
||||||
|
recset->set_codatt(codatt);
|
||||||
|
if (codatt.full())
|
||||||
|
{
|
||||||
|
TReport_section * f1 = rep.find_section('F', 1);
|
||||||
|
|
||||||
|
if (f1 != nullptr)
|
||||||
|
{
|
||||||
|
const int fields = f1->items();
|
||||||
|
|
||||||
|
for (int i = 0; i < fields; i++)
|
||||||
|
f1->field(i).hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
rep.set_recordset(recset);
|
||||||
|
rep.print_or_preview();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int cg4c00(int argc, char* argv[])
|
||||||
|
{
|
||||||
|
TRiepilogoIVAatt_app app;
|
||||||
|
app.run(argc, argv, TR("Stampa progressivi IVA per attività/competenza"));
|
||||||
|
return 0;
|
||||||
|
}
|
9
src/cg/cg4c00a.h
Normal file
9
src/cg/cg4c00a.h
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#define F_CODDITTA 101
|
||||||
|
#define F_RAGSOC 102
|
||||||
|
#define F_ANNO 103
|
||||||
|
#define F_DAMESE 104
|
||||||
|
#define F_AMESE 105
|
||||||
|
#define F_DADATA 106
|
||||||
|
#define F_ADATA 107
|
||||||
|
#define F_CODATT 108
|
||||||
|
#define F_DESATT 109
|
228
src/cg/cg4c00a.rep
Normal file
228
src/cg/cg4c00a.rep
Normal file
@ -0,0 +1,228 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<report libraries="" page_merge="" save_printer="" name="cg4c00a" use_printer_font="" orientation="2" page_split="" lpi="6" command="cg4 -11" class="cg4c00a">
|
||||||
|
<description>Riepilogo progressivi IVA per attivita'F;competenza</description>
|
||||||
|
<font face="Arial" size="7" />
|
||||||
|
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Head" level="" hidden="" page_break="" can_break="" pattern="1">
|
||||||
|
<field x="4" deactivated="" type="Data" hidden="" link="" dynamic_height="" shade_offset="" width="10" codval="" id="" pattern="1" hide_zero="" text="">
|
||||||
|
<source>#SYSTEM.DATE</source>
|
||||||
|
</field>
|
||||||
|
<field x="45.5" deactivated="" type="Testo" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="4" codval="" id="" pattern="1" hide_zero="" text="Ditta">
|
||||||
|
<source>#SYSTEM.RAGSOC</source>
|
||||||
|
</field>
|
||||||
|
<field x="51.5" deactivated="" type="Stringa" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="50" codval="" id="" pattern="1" hide_zero="" text="">
|
||||||
|
<source>#SYSTEM.RAGSOC</source>
|
||||||
|
</field>
|
||||||
|
<field x="154" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="4" codval="" id="" pattern="1" hide_zero="" text="Pag.">
|
||||||
|
<source>#PAGE</source>
|
||||||
|
</field>
|
||||||
|
<field x="158.5" deactivated="" type="Numero" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="5" codval="" id="" pattern="1" hide_zero="" text="">
|
||||||
|
<source>#PAGE</source>
|
||||||
|
</field>
|
||||||
|
<field x="16" y="1.25" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="45" codval="" id="" pattern="1" hide_zero="" text="Progressivi IVA per registroF;competenza">
|
||||||
|
<font face="Courier New" bold="1" size="10" />
|
||||||
|
</field>
|
||||||
|
<field x="60" y="1.25" deactivated="" type="Numero" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="6" codval="" id="" pattern="1" hide_zero="" text="">
|
||||||
|
<font face="Courier New" bold="1" size="10" />
|
||||||
|
<source>#ANNO</source>
|
||||||
|
</field>
|
||||||
|
<field x="68" y="1.25" deactivated="" type="Array" hidden="" link="" dynamic_height="" shade_offset="" width="16" codval="" id="" pattern="1" hide_zero="" text="">
|
||||||
|
<font face="Courier New" bold="1" size="10" />
|
||||||
|
<source>#DAMESE</source>
|
||||||
|
<list>
|
||||||
|
<li Value="da gennaio" Code="1" />
|
||||||
|
<li Value="da febbraio" Code="2" />
|
||||||
|
<li Value="da marzo" Code="3" />
|
||||||
|
<li Value="da aprile" Code="4" />
|
||||||
|
<li Value="da maggio" Code="5" />
|
||||||
|
<li Value="da giugno" Code="6" />
|
||||||
|
<li Value="da luglio" Code="7" />
|
||||||
|
<li Value="da agosto" Code="8" />
|
||||||
|
<li Value="da settembre" Code="9" />
|
||||||
|
<li Value="da ottobre" Code="10" />
|
||||||
|
<li Value="da novembre" Code="11" />
|
||||||
|
<li Value="da dicembre" Code="12" />
|
||||||
|
<li Value="annuale" Code="13" />
|
||||||
|
</list>
|
||||||
|
</field>
|
||||||
|
<field x="86" y="1.25" deactivated="" type="Array" hidden="" link="" dynamic_height="" shade_offset="" width="16" codval="" id="" pattern="1" hide_zero="" text="">
|
||||||
|
<font face="Courier New" bold="1" size="10" />
|
||||||
|
<source>#AMESE</source>
|
||||||
|
<list>
|
||||||
|
<li Value="a gennaio" Code="1" />
|
||||||
|
<li Value="a febbraio" Code="2" />
|
||||||
|
<li Value="a marzo" Code="3" />
|
||||||
|
<li Value="ad aprile" Code="4" />
|
||||||
|
<li Value="a maggio" Code="5" />
|
||||||
|
<li Value="a giugno" Code="6" />
|
||||||
|
<li Value="a luglio" Code="7" />
|
||||||
|
<li Value="ad agosto" Code="8" />
|
||||||
|
<li Value="a settembre" Code="9" />
|
||||||
|
<li Value="a ottobre" Code="10" />
|
||||||
|
<li Value="a novembre" Code="11" />
|
||||||
|
<li Value="a dicembre" Code="12" />
|
||||||
|
<li Value="" Code="13" />
|
||||||
|
</list>
|
||||||
|
</field>
|
||||||
|
<field x="103.5" y="1.25" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="28" codval="" id="" pattern="1" hide_zero="" text="per attivit&#E0;">
|
||||||
|
<font face="Courier New" bold="1" size="10" />
|
||||||
|
</field>
|
||||||
|
<field x="41" y="2.25" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="35" codval="" id="" pattern="1" hide_zero="" text="Da data di registrazione">
|
||||||
|
<font face="Courier New" bold="1" size="10" />
|
||||||
|
</field>
|
||||||
|
<field x="78" y="2.25" deactivated="" type="Data" hidden="" link="" dynamic_height="" shade_offset="" width="14" codval="" id="" pattern="1" hide_zero="" text="">
|
||||||
|
<font face="Courier New" bold="1" size="10" />
|
||||||
|
<source>#FROMDATE</source>
|
||||||
|
</field>
|
||||||
|
<field x="94" y="2.25" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="2" codval="" id="" pattern="1" hide_zero="" text="a">
|
||||||
|
<font face="Courier New" bold="1" size="10" />
|
||||||
|
</field>
|
||||||
|
<field x="97.5" y="2.25" deactivated="" type="Data" hidden="" link="" dynamic_height="" shade_offset="" width="14" codval="" id="" pattern="1" hide_zero="" text="">
|
||||||
|
<font face="Courier New" bold="1" size="10" />
|
||||||
|
<source>#TODATE</source>
|
||||||
|
</field>
|
||||||
|
<field x="64" y="3.25" deactivated="" type="Testo" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="10" codval="" id="" pattern="1" hide_zero="" text="Vendite">
|
||||||
|
<font face="Arial" size="10" />
|
||||||
|
</field>
|
||||||
|
<field x="90" y="3.25" deactivated="" type="Testo" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="15" codval="" id="" pattern="1" hide_zero="" text="Corrispettivi">
|
||||||
|
<font face="Arial" size="10" />
|
||||||
|
</field>
|
||||||
|
<field x="120.5" y="3.25" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="12" codval="" id="" pattern="1" hide_zero="" text="Acquisti">
|
||||||
|
<font face="Courier New" size="10" />
|
||||||
|
</field>
|
||||||
|
<field x="143" y="3.25" deactivated="" type="Testo" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="20" codval="" id="" pattern="1" hide_zero="" text="Acquisti indetraibili">
|
||||||
|
<font face="Arial" size="10" />
|
||||||
|
</field>
|
||||||
|
<field x="54.5" y="4.25" deactivated="" type="Testo" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="30" codval="" id="" pattern="1" hide_zero="" text=" Imponibile Imposta">
|
||||||
|
<font face="Arial" size="10" />
|
||||||
|
</field>
|
||||||
|
<field x="82" y="4.25" deactivated="" type="Testo" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="30" codval="" id="" pattern="1" hide_zero="" text=" Imponibile Imposta">
|
||||||
|
<font face="Arial" size="10" />
|
||||||
|
</field>
|
||||||
|
<field x="109.5" y="4.25" deactivated="" type="Testo" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="30" codval="" id="" pattern="1" hide_zero="" text=" Imponibile Imposta">
|
||||||
|
<font face="Arial" size="10" />
|
||||||
|
</field>
|
||||||
|
<field x="137" y="4.25" deactivated="" type="Testo" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="30" codval="" id="" pattern="1" hide_zero="" text=" Imponibile Imposta">
|
||||||
|
<font face="Arial" size="10" />
|
||||||
|
</field>
|
||||||
|
<field border="2" y="5.5" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" width="165" codval="" height="0" id="" pattern="1" hide_zero="" text="" />
|
||||||
|
</section>
|
||||||
|
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Head" level="1" hidden="" page_break="" can_break="" pattern="1" />
|
||||||
|
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Head" level="2" hidden="" page_break="" can_break="" pattern="1">
|
||||||
|
<groupby>COD[1,5]</groupby>
|
||||||
|
<field deactivated="" type="Numero" hidden="1" align="right" link="" dynamic_height="" shade_offset="" width="6" codval="" id="99" pattern="1" hide_zero="" text="">
|
||||||
|
<source>#SYSTEM.FIRM</source>
|
||||||
|
</field>
|
||||||
|
<field x="14" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="6" codval="" id="100" pattern="1" hide_zero="" text="">
|
||||||
|
<source>COD[1,5]</source>
|
||||||
|
<postscript description="H2.100 POSTSCRIPT">MESSAGE COPY,F2.100</postscript>
|
||||||
|
</field>
|
||||||
|
<field x="21" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="50" codval="" id="101" pattern="1" hide_zero="" text="">
|
||||||
|
<prescript description="H2.101 PRESCRIPT">MESSAGE ISAMREAD,10,CODDITTA=#99!CODATT=#100,DESCR</prescript>
|
||||||
|
<postscript description="H2.101 POSTSCRIPT">MESSAGE COPY,F2.101</postscript>
|
||||||
|
</field>
|
||||||
|
</section>
|
||||||
|
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Body" level="" hidden="" page_break="" can_break="" pattern="1" />
|
||||||
|
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Body" level="1" hidden="" page_break="" can_break="" pattern="1">
|
||||||
|
<field x="4" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="4" codval="" id="" pattern="1" hide_zero="" text="">
|
||||||
|
<source>COD[6,9]</source>
|
||||||
|
</field>
|
||||||
|
<field x="9" deactivated="" type="Stringa" hidden="" link="" dynamic_height="1" shade_offset="" width="45" codval="" height="2" id="" pattern="1" hide_zero="" text="">
|
||||||
|
<source>DESC</source>
|
||||||
|
</field>
|
||||||
|
<field x="55" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<source>IMPVEN</source>
|
||||||
|
<postscript description="B1.0 POSTSCRIPT">#THIS @
|
||||||
|
#F2.102 +!</postscript>
|
||||||
|
</field>
|
||||||
|
<field x="68.5" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<source>IVAVEN</source>
|
||||||
|
<postscript description="B1.0 POSTSCRIPT">#THIS @
|
||||||
|
#F2.103 +!</postscript>
|
||||||
|
</field>
|
||||||
|
<field x="82.5" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<source>IMPCORR</source>
|
||||||
|
<postscript description="B1.0 POSTSCRIPT">#THIS @
|
||||||
|
#F2.104 +!</postscript>
|
||||||
|
</field>
|
||||||
|
<field x="96" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<source>IVACORR</source>
|
||||||
|
<postscript description="B1.0 POSTSCRIPT">#THIS @
|
||||||
|
#F2.105 +!</postscript>
|
||||||
|
</field>
|
||||||
|
<field x="110" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<source>IMPACQ</source>
|
||||||
|
<postscript description="B1.0 POSTSCRIPT">#THIS @
|
||||||
|
#F2.106 +!</postscript>
|
||||||
|
</field>
|
||||||
|
<field x="123.5" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<source>IVAACQ</source>
|
||||||
|
<postscript description="B1.0 POSTSCRIPT">#THIS @
|
||||||
|
#F2.107 +!</postscript>
|
||||||
|
</field>
|
||||||
|
<field x="137.5" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<source>IMPACQIND</source>
|
||||||
|
<postscript description="B1.0 POSTSCRIPT">#THIS @
|
||||||
|
#F2.108 +!</postscript>
|
||||||
|
</field>
|
||||||
|
<field x="151" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<source>IVAACQIND</source>
|
||||||
|
<postscript description="B1.0 POSTSCRIPT">#THIS @
|
||||||
|
#F2.109 +!</postscript>
|
||||||
|
</field>
|
||||||
|
</section>
|
||||||
|
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Foot" level="" hidden="" page_break="" can_break="" pattern="1" />
|
||||||
|
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Foot" level="1" hidden="" page_break="" can_break="" pattern="1">
|
||||||
|
<field border="2" y="0.5" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" width="165" codval="" height="0" id="" pattern="1" hide_zero="" text="" />
|
||||||
|
<field x="9" y="1" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="20" codval="" height="2" id="101" pattern="1" hide_zero="" text="Totale">
|
||||||
|
<source>DESC</source>
|
||||||
|
</field>
|
||||||
|
<field x="55.5" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="102" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
||||||
|
<field x="69.5" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="103" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
||||||
|
<field x="83" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="104" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
||||||
|
<field x="97" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="105" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
||||||
|
<field x="110.5" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="106" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
||||||
|
<field x="124" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="107" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
||||||
|
<field x="137" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="108" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
||||||
|
<field x="151" y="1" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="109" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
||||||
|
</section>
|
||||||
|
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Foot" level="2" hidden="" height="4" page_break="" can_break="" pattern="1">
|
||||||
|
<field border="2" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" width="165" codval="" height="0" id="" pattern="1" hide_zero="" text="" />
|
||||||
|
<field x="14" y="0.5" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="6" codval="" id="100" pattern="1" hide_zero="" text="" />
|
||||||
|
<field x="9" y="0.5" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="6" codval="" id="101" pattern="1" hide_zero="" text="Totale">
|
||||||
|
<source>DESC</source>
|
||||||
|
</field>
|
||||||
|
<field x="21" y="0.5" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="33" codval="" height="2" id="101" pattern="1" hide_zero="" text="" />
|
||||||
|
<field x="55" y="0.5" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="102" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<postscript description="">#THIS @
|
||||||
|
#F1.102 +!</postscript>
|
||||||
|
</field>
|
||||||
|
<field x="68.5" y="0.5" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="103" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<postscript description="">#THIS @
|
||||||
|
#F1.103 +!</postscript>
|
||||||
|
</field>
|
||||||
|
<field x="82.5" y="0.5" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="104" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<postscript description="">#THIS @
|
||||||
|
#F1.104 +!</postscript>
|
||||||
|
</field>
|
||||||
|
<field x="96" y="0.5" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="105" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<postscript description="">#THIS @
|
||||||
|
#F1.105 +!</postscript>
|
||||||
|
</field>
|
||||||
|
<field x="110" y="0.5" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="106" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<postscript description="">#THIS @
|
||||||
|
#F1.106 +!</postscript>
|
||||||
|
</field>
|
||||||
|
<field x="123.5" y="0.5" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="107" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<postscript description="">#THIS @
|
||||||
|
#F1.107 +!</postscript>
|
||||||
|
</field>
|
||||||
|
<field x="137" y="0.5" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="108" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<postscript description="F2.108 POSTSCRIPT">#THIS @
|
||||||
|
#F1.108 +!</postscript>
|
||||||
|
</field>
|
||||||
|
<field x="151.5" y="0.5" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="109" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<postscript description="">#THIS @
|
||||||
|
#F1.109 +!</postscript>
|
||||||
|
</field>
|
||||||
|
</section>
|
||||||
|
</report>
|
106
src/cg/cg4c00a.uml
Normal file
106
src/cg/cg4c00a.uml
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
#include "cg4c00a.h"
|
||||||
|
|
||||||
|
#define ALL_EXPORT
|
||||||
|
#define REPORT
|
||||||
|
#define CLASS_NAME "cg4c00a"
|
||||||
|
|
||||||
|
TOOLBAR "topbar" 0 0 0 2
|
||||||
|
#include <aprintbar.h>
|
||||||
|
ENDPAGE
|
||||||
|
|
||||||
|
TOOLBAR "bottombar" 0 -3 0 1
|
||||||
|
#include <bprintbar.h>
|
||||||
|
ENDPAGE
|
||||||
|
|
||||||
|
PAGE "Stampa Riepilogo IVA per attività/competenza" -1 -1 62 5
|
||||||
|
|
||||||
|
GROUPBOX DLG_NULL 74 3
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 0 ""
|
||||||
|
END
|
||||||
|
|
||||||
|
NUMBER F_CODDITTA 5
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 1 "Ditta "
|
||||||
|
FLAGS "FRD"
|
||||||
|
USE LF_NDITTE KEY 1
|
||||||
|
INPUT CODDITTA F_CODDITTA
|
||||||
|
OUTPUT F_RAGSOC RAGSOC
|
||||||
|
CHECKTYPE REQUIRED
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_RAGSOC 50
|
||||||
|
BEGIN
|
||||||
|
PROMPT 15 1 "Ragione "
|
||||||
|
FLAGS "D"
|
||||||
|
END
|
||||||
|
|
||||||
|
NUMBER F_ANNO 4
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 3 "Anno "
|
||||||
|
FLAGS "AP"
|
||||||
|
CHECKTYPE REQUIRED
|
||||||
|
END
|
||||||
|
|
||||||
|
LIST F_DAMESE 20
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 5 "Da mese "
|
||||||
|
ITEM "13|13a liquid."
|
||||||
|
FLAGS "MP"
|
||||||
|
MESSAGE COPY,F_AMESE
|
||||||
|
END
|
||||||
|
|
||||||
|
LIST F_AMESE 20
|
||||||
|
BEGIN
|
||||||
|
PROMPT 35 5 " A mese "
|
||||||
|
ITEM "13|13a liquid."
|
||||||
|
FLAGS "MP"
|
||||||
|
WARINIG "Il mese di inizio non può essere successico al mese di fine"
|
||||||
|
VALIDATE F_DAMESE<=F_AMESE
|
||||||
|
END
|
||||||
|
|
||||||
|
DATE F_DADATA
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 7 "Da: data registrazione "
|
||||||
|
END
|
||||||
|
|
||||||
|
DATE F_ADATA
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 9 " A: data registrazione "
|
||||||
|
WARINIG "La data di inizio non può essere successico alla data di fine"
|
||||||
|
VALIDATE DATE_CMP_FUNC >= F_>ADATA
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_CODATT 5
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 11 "Codice Attivita'"
|
||||||
|
FLAGS "UZ"
|
||||||
|
USE LF_ATTIV KEY 1
|
||||||
|
INPUT CODDITTA F_CODDITTA SELECT
|
||||||
|
INPUT CODATT F_CODATT
|
||||||
|
DISPLAY "Attivita'" CODATT
|
||||||
|
DISPLAY "Prevalente" ATTPREV
|
||||||
|
DISPLAY " @48" DESCR
|
||||||
|
OUTPUT F_CODATT CODATT
|
||||||
|
WARNING "Attivita' assente"
|
||||||
|
CHECKTYPE NORMAL
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_DESATT 50
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 13 "Codice Attivita'"
|
||||||
|
FLAGS "UZ"
|
||||||
|
USE LF_ATTIV KEY 2
|
||||||
|
INPUT CODDITTA F_CODDITTA SELECT
|
||||||
|
INPUT DESCR F_DESATT
|
||||||
|
DISPLAY " @50" DESCR
|
||||||
|
DISPLAY "Attivita'" CODATT
|
||||||
|
DISPLAY "Prevalente" ATTPREV
|
||||||
|
COPY OUTPUT F_CODATT
|
||||||
|
WARNING "Attivita' assente"
|
||||||
|
CHECKTYPE NORMAL
|
||||||
|
END
|
||||||
|
|
||||||
|
ENDPAGE
|
||||||
|
|
||||||
|
ENDMASK
|
@ -13,14 +13,14 @@
|
|||||||
#include <recarray.h>
|
#include <recarray.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __REPUTILS_H
|
|
||||||
#include <reputils.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef __MULTIREC
|
#ifndef __MULTIREC
|
||||||
#include <multirec.h>
|
#include <multirec.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __REPUTILS_H
|
||||||
|
#include <reputils.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __TABUTIL_H
|
#ifndef __TABUTIL_H
|
||||||
#include <tabutil.h>
|
#include <tabutil.h>
|
||||||
#endif
|
#endif
|
||||||
@ -38,7 +38,8 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __PROGIND_H
|
#ifndef __PROGIND_H
|
||||||
#include <progind.h>
|
class TDocumento;
|
||||||
|
class TProgind;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "../ba/ba8500.h"
|
#include "../ba/ba8500.h"
|
||||||
@ -914,51 +915,73 @@ bool is_IVAxCassa(const TRectype& mov);
|
|||||||
// TRiepilogoIVA_recordset
|
// TRiepilogoIVA_recordset
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
class TRiepilogoIVA_recordset : public TRecordset
|
class TRiepilogoIVA_recordset : public TRecordset
|
||||||
{
|
{
|
||||||
TArray _rows;
|
TArray _rows;
|
||||||
TArray _info;
|
TArray _info;
|
||||||
long _pos;
|
long _pos;
|
||||||
bool _annuale;
|
bool _annuale;
|
||||||
|
TString8 _mov_codatt;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual const TVariant& get_field(int num, const char* field) const;
|
virtual const TVariant& get_field(int num, const char* field) const;
|
||||||
void TRiepilogoIVA_recordset::add_field(TFieldtypes tipo, short id, int width, const char* name);
|
void add_field(TFieldtypes tipo, short id, int width, const char* name);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual TRecnotype items() const { return _rows.items(); }
|
long pos() const { return _pos; }
|
||||||
virtual bool move_to(TRecnotype pos);
|
const TArray & rows() const { return _rows; }
|
||||||
virtual TRecnotype current_row() const { return _pos; }
|
const TArray & info() const { return _info; }
|
||||||
virtual void requery();
|
virtual TRecnotype items() const override { return _rows.items(); }
|
||||||
virtual const TString& query_text() const;
|
virtual bool move_to(TRecnotype pos) override ;
|
||||||
virtual unsigned int columns() const { return _info.items(); }
|
virtual TRecnotype current_row() const override { return _pos; }
|
||||||
virtual const TRecordset_column_info& column_info(unsigned int column) const { return (const TRecordset_column_info&)_info[column]; }
|
virtual const char * codice(const TRectype & rmi);
|
||||||
virtual const TVariant& get(unsigned int column) const;
|
virtual void requery() override ;
|
||||||
|
virtual const TString& query_text() const override;
|
||||||
|
virtual unsigned int columns() const override { return _info.items(); }
|
||||||
|
virtual const TRecordset_column_info& column_info(unsigned int column) const override { return (const TRecordset_column_info&)_info[column]; }
|
||||||
|
virtual const TVariant& get(unsigned int column) const override;
|
||||||
const TVariant& get(const char * name) const;
|
const TVariant& get(const char * name) const;
|
||||||
|
|
||||||
void set_from(const TDate& from) { set_var("#FROMDATE", from, true); ; }
|
void set_from(const TDate& from) { set_var("#FROMDATE", from, true); }
|
||||||
void set_to(const TDate& to) { set_var("#TODATE", to, true); }
|
void set_to(const TDate& to) { set_var("#TODATE", to, true); }
|
||||||
void set_anno(const int anno) { set_var("#ANNO", (long)anno, true); };
|
void set_anno(const int anno) { set_var("#ANNO", (long)anno, true); };
|
||||||
void set_codatt(const TString & codatt) { set_var("#CODATT", codatt, true); }
|
void set_codatt(const TString & codatt) { set_var("#CODATT", codatt, true); }
|
||||||
void set_da_mese(const int mese) { set_var("#DAMESE", (long) mese, true); }
|
void set_da_mese(const int mese) { set_var("#DAMESE", (long) mese, true); }
|
||||||
void set_a_mese(const int mese) { set_var("#AMESE", (long) mese, true); }
|
void set_a_mese(const int mese) { set_var("#AMESE", (long) mese, true); }
|
||||||
|
void set_codatt(const char * codatt) { set_var("#CODATT", codatt, true); }
|
||||||
|
void set_tiporeg(int tiporeg) { set_var("#TIPOREG", (long) tiporeg, true); }
|
||||||
|
|
||||||
const TDate from() const { return get_var("#FROMDATE").as_date(); }
|
const TDate from() const { return get_var("#FROMDATE").as_date(); }
|
||||||
const TDate to() const { return get_var("#TODATE").as_date(); }
|
const TDate to() const { return get_var("#TODATE").as_date(); }
|
||||||
const int anno() const { return (int)get_var("#ANNO").as_int(); };
|
const int anno() const { return (int)get_var("#ANNO").as_int(); };
|
||||||
const TString & codatt() const { return get_var("#CODATT").as_string(); }
|
|
||||||
int da_mese() const { return (int)get_var("#DAMESE").as_int(); }
|
int da_mese() const { return (int)get_var("#DAMESE").as_int(); }
|
||||||
int a_mese() const { return (int)get_var("#AMESE").as_int(); }
|
int a_mese() const { return (int)get_var("#AMESE").as_int(); }
|
||||||
|
const TString & codatt() const { return get_var("#CODATT").as_string(); }
|
||||||
|
int tiporeg() const { return (int)get_var("#TIPOREG").as_int(); }
|
||||||
|
const TString & mov_codatt() const { return _mov_codatt; }
|
||||||
|
|
||||||
bool set_annual(bool on) { return _annuale = on; }
|
bool set_annual(bool on) { return _annuale = on; }
|
||||||
bool annuale() const { return _annuale; }
|
bool annuale() const { return _annuale; }
|
||||||
virtual bool is_competenza() const { return false; }
|
virtual bool is_competenza() const { return false; }
|
||||||
virtual int is_intra() const { return false; }
|
virtual int is_intra() const { return false; }
|
||||||
virtual const char * remap_IVA(const char * codIVA, const TISAM_recordset & rmov) const { return codIVA; }
|
|
||||||
|
|
||||||
TRiepilogoIVA_recordset();
|
TRiepilogoIVA_recordset();
|
||||||
virtual ~TRiepilogoIVA_recordset() { }
|
virtual ~TRiepilogoIVA_recordset() = default;
|
||||||
|
};
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
// TRiepilogoIVAatt_recordset
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
class TRiepilogoIVAatt_recordset : public TRiepilogoIVA_recordset
|
||||||
|
{
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual const char * codice(const TRectype & rmi) override;
|
||||||
|
|
||||||
|
public:
|
||||||
|
TRiepilogoIVAatt_recordset() : TRiepilogoIVA_recordset() {}
|
||||||
|
virtual ~TRiepilogoIVAatt_recordset() = default;
|
||||||
};
|
};
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
@ -969,12 +992,11 @@ class TRiepilogoIVA_report : public TReport
|
|||||||
{
|
{
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool use_mask() { return false; }
|
virtual bool use_mask() override { return false; }
|
||||||
virtual bool get_usr_val(const TString& name, TVariant& var) const;
|
virtual bool get_usr_val(const TString& name, TVariant& var) const override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual bool set_recordset(TRecordset * set);
|
virtual bool set_recordset(TRecordset * set) override;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
char frequenza_versamenti(int year, long firm = -1); // Ritorna 'M'ensile o 'T'rimestrale
|
char frequenza_versamenti(int year, long firm = -1); // Ritorna 'M'ensile o 'T'rimestrale
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
#include "causali.h"
|
#include "causali.h"
|
||||||
#include <utility.h>
|
#include <utility.h>
|
||||||
|
|
||||||
|
#define F_START 101
|
||||||
|
#define F_END 102
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
// TRiepilogoIVA_report
|
// TRiepilogoIVA_report
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
@ -10,7 +13,7 @@ bool TRiepilogoIVA_report::set_recordset(TRecordset * set)
|
|||||||
{
|
{
|
||||||
const bool ok = TReport::set_recordset(set);
|
const bool ok = TReport::set_recordset(set);
|
||||||
|
|
||||||
if (set != nullptr)
|
if (set != nullptr)
|
||||||
{
|
{
|
||||||
set->unfreeze();
|
set->unfreeze();
|
||||||
set->requery();
|
set->requery();
|
||||||
@ -21,54 +24,54 @@ bool TRiepilogoIVA_report::set_recordset(TRecordset * set)
|
|||||||
|
|
||||||
bool TRiepilogoIVA_report::get_usr_val(const TString& name, TVariant& var) const
|
bool TRiepilogoIVA_report::get_usr_val(const TString& name, TVariant& var) const
|
||||||
{
|
{
|
||||||
TRiepilogoIVA_recordset * rs = (TRiepilogoIVA_recordset *)recordset();
|
TRiepilogoIVA_recordset * rs = (TRiepilogoIVA_recordset *)recordset();
|
||||||
|
|
||||||
if (name == "#FROMDATE")
|
if (name == "#FROMDATE")
|
||||||
{
|
{
|
||||||
var = rs->from();
|
var = rs->from();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (name == "#TODATE")
|
if (name == "#TODATE")
|
||||||
{
|
{
|
||||||
var = rs->to();
|
var = rs->to();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (name == "#ANNO")
|
if (name == "#ANNO")
|
||||||
{
|
{
|
||||||
var = rs->anno();
|
var = rs->anno();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (name == "#CODATT")
|
if (name == "#CODATT")
|
||||||
{
|
{
|
||||||
var = rs->codatt();
|
var = rs->codatt();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (name == "#DAMESE")
|
if (name == "#DAMESE")
|
||||||
{
|
{
|
||||||
var = (long)rs->da_mese();
|
var = (long)rs->da_mese();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (name == "#AMESE")
|
if (name == "#AMESE")
|
||||||
{
|
{
|
||||||
var = (long)rs->a_mese();
|
var = (long)rs->a_mese();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return TReport::get_usr_val(name, var);
|
return TReport::get_usr_val(name, var);
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
@ -77,7 +80,7 @@ bool TRiepilogoIVA_report::get_usr_val(const TString& name, TVariant& var) const
|
|||||||
|
|
||||||
class TRiepilogoIVA_record : public TObject
|
class TRiepilogoIVA_record : public TObject
|
||||||
{
|
{
|
||||||
TString4 _cod;
|
TString16 _cod;
|
||||||
TArray _values;
|
TArray _values;
|
||||||
|
|
||||||
real & get_val(int index);
|
real & get_val(int index);
|
||||||
@ -94,8 +97,8 @@ public:
|
|||||||
real & ivaven() { return get_val(5); }
|
real & ivaven() { return get_val(5); }
|
||||||
real & impacqind() { return get_val(6); }
|
real & impacqind() { return get_val(6); }
|
||||||
real & ivaacqind() { return get_val(7); }
|
real & ivaacqind() { return get_val(7); }
|
||||||
TRiepilogoIVA_record& operator= (const TRiepilogoIVA_record & rec) { return copy(rec);}
|
|
||||||
|
|
||||||
|
TRiepilogoIVA_record& operator= (const TRiepilogoIVA_record & rec) { return copy(rec);}
|
||||||
TRiepilogoIVA_record(const TRiepilogoIVA_record & rec) { copy(rec); }
|
TRiepilogoIVA_record(const TRiepilogoIVA_record & rec) { copy(rec); }
|
||||||
|
|
||||||
TRiepilogoIVA_record(const char * cod) : _cod(cod) {}
|
TRiepilogoIVA_record(const char * cod) : _cod(cod) {}
|
||||||
@ -117,6 +120,14 @@ real & TRiepilogoIVA_record::get_val(int index)
|
|||||||
return *val;
|
return *val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char * TRiepilogoIVA_recordset::codice(const TRectype & rmi)
|
||||||
|
{
|
||||||
|
TString & cod = get_tmp_string(32);
|
||||||
|
|
||||||
|
cod = rmi.get(RMI_CODIVA);
|
||||||
|
return cod;
|
||||||
|
}
|
||||||
|
|
||||||
void TRiepilogoIVA_recordset::requery()
|
void TRiepilogoIVA_recordset::requery()
|
||||||
{
|
{
|
||||||
if (not_frozen())
|
if (not_frozen())
|
||||||
@ -135,89 +146,93 @@ void TRiepilogoIVA_recordset::requery()
|
|||||||
recset.set_var("#AMESE", (long)a_mese(), true);
|
recset.set_var("#AMESE", (long)a_mese(), true);
|
||||||
for (bool ok = recset.move_first(); ok; ok = recset.move_next())
|
for (bool ok = recset.move_first(); ok; ok = recset.move_next())
|
||||||
{
|
{
|
||||||
TString cod = remap_IVA(recset.get(RMI_CODIVA).as_string(), recset);
|
const TRegistro & reg = cached_registro((const char *)recset.get(FIELD_NAME(LF_MOV, MOV_REG)).as_string(), anno());
|
||||||
|
TipoIVA t = reg.iva();
|
||||||
|
|
||||||
if (cod.full())
|
_mov_codatt = reg.attivita();
|
||||||
{
|
|
||||||
TRiepilogoIVA_record * rec = (TRiepilogoIVA_record *)work_array.objptr(cod);
|
|
||||||
|
|
||||||
long gruppo = recset.get(RMI_GRUPPO).as_int();
|
|
||||||
long conto = recset.get(RMI_CONTO).as_int();
|
|
||||||
long sottoconto = recset.get(RMI_SOTTOCONTO).as_int();
|
|
||||||
int indetr = recset.get(RMI_TIPODET).as_int();
|
|
||||||
|
|
||||||
TRegistro reg(recset.get(FIELD_NAME(LF_MOV, MOV_REG)).as_string());
|
TString16 cod = codice(recset.cursor()->curr());
|
||||||
TipoIVA t = reg.iva();
|
|
||||||
TDate data = recset.get(FIELD_NAME(LF_MOV, MOV_DATAREG)).as_date();
|
|
||||||
const int meseliq = recset.get(FIELD_NAME(LF_MOV, MOV_MESELIQ)).as_int();
|
|
||||||
const TDate datadoc = recset.get(FIELD_NAME(LF_MOV, MOV_DATADOC)).as_date();
|
|
||||||
const TipoIVA tipo = reg.iva(); // 1=Vendite; 2=Acquisti
|
|
||||||
const bool fatt_rit_2018 = recset.get(FIELD_NAME(LF_MOV, MOV_RITFATT)).as_bool() && (data.year() >= 2018);
|
|
||||||
const int year_diff = data.year() - datadoc.year();
|
|
||||||
const bool fattritind = ((tipo == iva_acquisti) && fatt_rit_2018) && ((year_diff > 2) || ((year_diff >= 1) && data.month() >= 5));
|
|
||||||
const bool fattrit = ((tipo == iva_acquisti) && !fattritind && fatt_rit_2018) && (year_diff >= 1);
|
|
||||||
|
|
||||||
if (is_competenza())
|
if (cod.full())
|
||||||
{
|
{
|
||||||
if (meseliq != 0)
|
long gruppo = recset.get(RMI_GRUPPO).as_int();
|
||||||
{
|
long conto = recset.get(RMI_CONTO).as_int();
|
||||||
if (meseliq > data.month())
|
long sottoconto = recset.get(RMI_SOTTOCONTO).as_int();
|
||||||
data.addyear(-1);
|
int indetr = recset.get(RMI_TIPODET).as_int();
|
||||||
data.set_month(meseliq);
|
TDate data = recset.get(FIELD_NAME(LF_MOV, MOV_DATAREG)).as_date();
|
||||||
data.set_end_month();
|
const int meseliq = recset.get(FIELD_NAME(LF_MOV, MOV_MESELIQ)).as_int();
|
||||||
}
|
const TDate datadoc = recset.get(FIELD_NAME(LF_MOV, MOV_DATADOC)).as_date();
|
||||||
}
|
|
||||||
if (fattrit)
|
const bool fatt_rit_2018 = recset.get(FIELD_NAME(LF_MOV, MOV_RITFATT)).as_bool() && (data.year() >= 2018);
|
||||||
{
|
const int year_diff = data.year() - datadoc.year();
|
||||||
data.addyear(-1);
|
const bool fattritind = ((t == iva_acquisti) && fatt_rit_2018) && ((year_diff > 2) || ((year_diff >= 1) && data.month() >= 5));
|
||||||
data.set_month(12);
|
const bool fattrit = ((t == iva_acquisti) && !fattritind && fatt_rit_2018) && (year_diff >= 1);
|
||||||
data.set_end_month();
|
|
||||||
}
|
if (is_competenza())
|
||||||
if (data.year() != anno() || (data.year() == anno() && (data.month() < da_mese() || data.month() > a_mese())))
|
{
|
||||||
continue;
|
if (meseliq != 0)
|
||||||
if (rec == nullptr)
|
{
|
||||||
work_array.add(cod, rec = new TRiepilogoIVA_record(cod));
|
if (meseliq > data.month())
|
||||||
if (t == iva_acquisti)
|
data.addyear(-1);
|
||||||
{
|
data.set_month(meseliq);
|
||||||
if (indetr == 0)
|
data.set_end_month();
|
||||||
{
|
}
|
||||||
real & r = rec->impacq();
|
}
|
||||||
r += recset.get(RMI_IMPONIBILE).as_real();
|
if (fattrit)
|
||||||
real & r1 = rec->ivaacq();
|
{
|
||||||
r1 += recset.get(RMI_IMPOSTA).as_real();
|
data.addyear(-1);
|
||||||
}
|
data.set_month(12);
|
||||||
else
|
data.set_end_month();
|
||||||
{
|
}
|
||||||
real & r = rec->impacqind();
|
if (data.year() != anno() || (data.year() == anno() && (data.month() < da_mese() || data.month() > a_mese())))
|
||||||
r += recset.get(RMI_IMPONIBILE).as_real();
|
continue;
|
||||||
real & r1 = rec->ivaacqind();
|
|
||||||
r1 += recset.get(RMI_IMPOSTA).as_real();
|
TRiepilogoIVA_record * rec = (TRiepilogoIVA_record *)work_array.objptr(cod);
|
||||||
}
|
|
||||||
}
|
if (rec == nullptr)
|
||||||
else
|
work_array.add(cod, rec = new TRiepilogoIVA_record(cod));
|
||||||
if (t == iva_vendite)
|
if (t == iva_acquisti)
|
||||||
{
|
{
|
||||||
if (reg.corrispettivi())
|
if (indetr == 0)
|
||||||
{
|
{
|
||||||
real & r = rec->impcorr();
|
real & r = rec->impacq();
|
||||||
r += recset.get(RMI_IMPONIBILE).as_real();
|
r += recset.get(RMI_IMPONIBILE).as_real();
|
||||||
real & r1 = rec->ivacorr();
|
real & r1 = rec->ivaacq();
|
||||||
r1 += recset.get(RMI_IMPOSTA).as_real();
|
r1 += recset.get(RMI_IMPOSTA).as_real();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
real & r = rec->impven();
|
real & r = rec->impacqind();
|
||||||
r += recset.get(RMI_IMPONIBILE).as_real();
|
r += recset.get(RMI_IMPONIBILE).as_real();
|
||||||
real & r1 = rec->ivaven();
|
real & r1 = rec->ivaacqind();
|
||||||
r1 += recset.get(RMI_IMPOSTA).as_real();
|
r1 += recset.get(RMI_IMPOSTA).as_real();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
else
|
||||||
|
if (t == iva_vendite)
|
||||||
|
{
|
||||||
|
if (reg.corrispettivi())
|
||||||
|
{
|
||||||
|
real & r = rec->impcorr();
|
||||||
|
r += recset.get(RMI_IMPONIBILE).as_real();
|
||||||
|
real & r1 = rec->ivacorr();
|
||||||
|
r1 += recset.get(RMI_IMPOSTA).as_real();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
real & r = rec->impven();
|
||||||
|
r += recset.get(RMI_IMPONIBILE).as_real();
|
||||||
|
real & r1 = rec->ivaven();
|
||||||
|
r1 += recset.get(RMI_IMPOSTA).as_real();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TString_array keys;
|
TString_array keys;
|
||||||
|
|
||||||
work_array.get_keys(keys);
|
work_array.get_keys(keys);
|
||||||
|
keys.sort();
|
||||||
_rows.destroy();
|
_rows.destroy();
|
||||||
FOR_EACH_ARRAY_ITEM(keys, i, obj)
|
FOR_EACH_ARRAY_ITEM(keys, i, obj)
|
||||||
{
|
{
|
||||||
@ -242,6 +257,7 @@ bool TRiepilogoIVA_recordset::move_to(TRecnotype pos)
|
|||||||
_pos = pos;
|
_pos = pos;
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
const TString& TRiepilogoIVA_recordset::query_text() const
|
const TString& TRiepilogoIVA_recordset::query_text() const
|
||||||
{
|
{
|
||||||
TString & query = get_tmp_string();
|
TString & query = get_tmp_string();
|
||||||
@ -286,7 +302,11 @@ const TVariant& TRiepilogoIVA_recordset::get_field(int num, const char* field) c
|
|||||||
else
|
else
|
||||||
if (xvt_str_compare_ignoring_case(field, DESC) == 0)
|
if (xvt_str_compare_ignoring_case(field, DESC) == 0)
|
||||||
{
|
{
|
||||||
TCodiceIVA c(row.cod());
|
TString codice = row.cod();
|
||||||
|
|
||||||
|
if (codice.len() > 4)
|
||||||
|
codice = codice.smid(5);
|
||||||
|
TCodiceIVA c(codice);
|
||||||
|
|
||||||
val = c.descrizione();
|
val = c.descrizione();
|
||||||
return val;
|
return val;
|
||||||
@ -395,7 +415,6 @@ const TVariant& TRiepilogoIVA_recordset::get(const char * name) const
|
|||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const TVariant& TRiepilogoIVA_recordset::get(unsigned int column) const
|
const TVariant& TRiepilogoIVA_recordset::get(unsigned int column) const
|
||||||
{
|
{
|
||||||
TVariant & v = get_tmp_var();
|
TVariant & v = get_tmp_var();
|
||||||
@ -422,3 +441,13 @@ TRiepilogoIVA_recordset::TRiepilogoIVA_recordset() : TRecordset(), _pos(0), _ann
|
|||||||
add_field(_realfld, 110, 18, IVAACQIND);
|
add_field(_realfld, 110, 18, IVAACQIND);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char * TRiepilogoIVAatt_recordset::codice(const TRectype & rmi)
|
||||||
|
{
|
||||||
|
TString & cod = get_tmp_string(32);
|
||||||
|
TString att = mov_codatt();
|
||||||
|
|
||||||
|
att.rpad(5);
|
||||||
|
cod = att;
|
||||||
|
cod << rmi.get(RMI_CODIVA);
|
||||||
|
return cod;
|
||||||
|
}
|
||||||
|
@ -115,7 +115,9 @@ Item_10 = "Operazioni annuali", [CGMENU_029]
|
|||||||
Item_11 = "IVA per cassa / differita", <icmenu.men>
|
Item_11 = "IVA per cassa / differita", <icmenu.men>
|
||||||
Item_12 = "Gestione autotrasportatori", "cg4 -9", "F"
|
Item_12 = "Gestione autotrasportatori", "cg4 -9", "F"
|
||||||
Item_13 = "Stampa progressivi avanzata", "cg0 -7", "F"
|
Item_13 = "Stampa progressivi avanzata", "cg0 -7", "F"
|
||||||
Item_13 = "Stampa progressivi IVA per competenza", "cg4 -10", "F"
|
Item_14 = "Stampa progressivi avanzata per attività", "cg0 -8", "F"
|
||||||
|
Item_15 = "Stampa progressivi IVA per competenza", "cg4 -10", "F"
|
||||||
|
Item_16 = "Stampa progressivi IVA per attività/competenza", "cg4 -11", "F"
|
||||||
|
|
||||||
[CGMENU_011]
|
[CGMENU_011]
|
||||||
Caption = "Tabelle ministeriali"
|
Caption = "Tabelle ministeriali"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user