Nuove stampe IVA per cassa

git-svn-id: svn://10.65.10.50/branches/R_10_00@22760 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2012-11-30 14:37:14 +00:00
parent b72bd2d1c9
commit 886efa8b82
7 changed files with 207 additions and 35 deletions

@ -6,8 +6,8 @@ int main(int argc, char** argv)
const int n = argc > 1 ? argv[1][1]-'0' : 0;
switch (n)
{
case 1:
default: ic0100(argc, argv); break; // Stampa IVA per cassa
case 1: ic0200(argc, argv); break; // Stampa Pag IVA per cassa
default: ic0100(argc, argv); break; // Stampa Mov IVA per cassa
}
return 0;
}

@ -2,3 +2,4 @@
#define F_TIPOIVA 202
#define F_DAL 203
#define F_AL 204
#define F_CHIUSA 205

@ -1,12 +1,12 @@
#include "ic0100a.h"
PAGE "IVA differita / per cassa" -1 -1 44 9
PAGE "IVA differita / per cassa" -1 -1 44 12
RADIOBUTTON F_TIPODIFF 20
BEGIN
PROMPT 1 1 "Tipo stampa"
ITEM "1|IVA differita"
PROMPT 1 1 "Regime IVA"
ITEM "2|IVA per cassa"
ITEM "1|IVA differita"
FIELD #TIPODIFF
END
@ -35,6 +35,16 @@ BEGIN
FIELD #AL
END
RADIOBUTTON F_CHIUSA 42
BEGIN
PROMPT 1 8 "Selezione partite"
ITEM "T|Tutte"
ITEM "|Aperte"
ITEM "X|Chiuse"
FIELD #CHIUSA
FLAGS "Z"
END
ENDPAGE
TOOLBAR "topbar" 0 0 0 2

@ -1,40 +1,66 @@
<?xml version="1.0" encoding="UTF-8" ?>
<report name="ic0100f" lpi="6">
<font face="Courier New" size="10" />
<font face="Arial" size="10" />
<section type="Head" pattern="1" />
<section type="Head" level="1" pattern="1">
<field type="Stringa" valign="center" align="center" width="90" height="3" pattern="1">
<font face="Arial" bold="1" size="24" />
<source>"MOVIMENTI IVA " + IF(#TIPODIFF==1,"DIFFERITA", "PER CASSA")</source>
<field type="Stringa" align="center" width="90" height="2" pattern="1">
<font face="Arial" bold="1" size="20" />
<source>IF(#TIPOIVA==1,"VENDITE", "ACQUISTI") + " CON IVA " + IF(#TIPODIFF==1,"DIFFERITA", "PER CASSA")</source>
</field>
<field type="Stringa" align="center" y="2" width="90" height="1" pattern="1">
<font face="Arial" bold="1" size="10" />
<source>IF(#DAL="",""," DAL "+#DAL) + IF(#AL="","", " AL "+#AL)</source>
</field>
</section>
<section type="Head" level="2" pattern="1">
<groupby>NUMREG</groupby>
<font face="Arial" bold="1" size="10" />
<field border="3" y="0.5" type="Linea" width="90" height="0" pattern="1" />
<field y="1" type="Testo" width="10" pattern="1" text="Documento " />
<field x="10" y="1" type="Stringa" width="10" pattern="1">
<source>MOV.NUMDOC</source>
</field>
<field x="22" y="1" type="Testo" width="3" pattern="1" text="Del" />
<field x="26" y="1" type="Data" width="10" pattern="1">
<source>MOV.DATADOC</source>
</field>
<field x="40" y="1" type="Stringa" width="50" pattern="1">
<source>CLIFO.RAGSOC</source>
</field>
<field x="19" y="2" type="Testo" width="7" pattern="1" text="Sezione" />
<field x="25" y="2" type="Testo" align="right" width="15" pattern="1" text="Importo" />
<field x="40" y="2" type="Testo" align="right" width="15" pattern="1" text="Imponibile" />
<field x="56" y="2" type="Testo" align="right" width="4" pattern="1" text="IVA" />
<field x="60" y="2" type="Testo" align="right" width="15" pattern="1" text="Imposta" />
<field x="75" y="2" type="Testo" align="right" width="15" pattern="1" text="Versata" />
<field y="1" type="Testo" width="8" pattern="1" text="Fattura" />
<field x="8" y="1" type="Stringa" width="10" pattern="1">
<source>MOV.NUMDOC</source>
</field>
<field x="19" y="1" type="Testo" width="3" pattern="1" text="del" />
<field x="22" y="1" type="Data" width="10" pattern="1">
<source>MOV.DATADOC</source>
</field>
<field x="40" y="1" type="Stringa" width="50" pattern="1">
<source>CLIFO.RAGSOC</source>
</field>
<field x="19" y="2" type="Testo" width="7" pattern="1" text="Sezione" />
<field x="25" y="2" type="Testo" align="right" width="15" pattern="1" text="Importo" />
<field x="40" y="2" type="Testo" align="right" width="15" pattern="1" text="Imponibile" />
<field x="56" y="2" type="Testo" align="right" width="4" pattern="1" text="IVA" />
<field x="60" y="2" type="Testo" align="right" width="15" pattern="1" text="Imposta" />
<field x="80" y="2" type="Testo" align="left" width="6" pattern="1" text="Chiusa" />
<field y="3" type="Numero" align="right" link="MOV.NUMREG" width="7" pattern="1" hide_zero="1">
<source>NUMREG</source>
</field>
<field x="8" y="3" type="Data" width="10" pattern="1">
<source>DATAREG</source>
</field>
<field x="19" y="3" type="Array" width="5" pattern="1">
<source>IF(#TIPOIVA==1,"D","A")</source>
<list>
<li Value="Dare" Code="D" />
<li Value="Avere" Code="A" />
</list>
</field>
<field x="25" y="3" type="Valuta" align="right" width="15" pattern="1" text="###.###.###,@@">
<source>MOV.TOTDOC</source>
</field>
<field x="83" y="3" valign="center" type="Booleano" width="1" pattern="1">
<source>CHIUSA</source>
</field>
<field border="1" y="4.5" type="Linea" width="90" height="0" pattern="1" />
</section>
<section type="Body" pattern="1" />
<section type="Body" level="1" pattern="1">
<field type="Numero" align="right" link="MOV.NUMREG" width="7" pattern="1" hide_zero="1">
<source>NUMREGP</source>
<alt_source>NUMREG</alt_source>
<source>IF(NUMPRO=999,"",NUMREGP)</source>
<alt_source>IF(NUMPRO=999,"",NUMREG)</alt_source>
</field>
<field x="8" type="Data" width="10" pattern="1">
<source>DATAREGP</source>
@ -53,20 +79,20 @@
<field x="40" type="Valuta" align="right" width="15" pattern="1" text="###.###.###,@@">
<source>IMPONIBILE</source>
</field>
<field x="55" type="Stringa" align="right" width="4" pattern="1">
<field x="56" type="Stringa" align="right" width="4" pattern="1">
<source>CODIVA</source>
</field>
<field x="60" type="Valuta" align="right" width="15" pattern="1" text="###.###.###,@@">
<source>IMPOSTA</source>
</field>
<field x="75" type="Valuta" align="right" width="15" pattern="1" text="###.###.###,@@">
<source>VERSATA</source>
</field>
<field x="83" type="Booleano" width="1" pattern="1">
<source>CHIUSA</source>
</field>
</section>
<section type="Foot" pattern="1" />
<section type="Foot" level="1" pattern="1" />
<section type="Foot" level="2" pattern="1" />
<sql>USE IVADIFF SELECT (BETWEEN(DATAREG,#DAL,#AL))&#26;&#26;(TIPOIVA==#TIPOIVA)&#26;&#26;(TIPODIFF==#TIPODIFF)
JOIN MOV INTO NUMREG==NUMREG
JOIN CLIFO TO MOV INTO TIPOCF==TIPO CODCF==CODCF</sql>
<sql>USE IVADIFF SELECT (BETWEEN(DATAREG,#DAL,#AL))&#26;&#26;(TIPOIVA==#TIPOIVA)&#26;&#26;(TIPODIFF==#TIPODIFF)&#26;&#26;((CHIUSA=#CHIUSA)||(#CHIUSA="T"))
JOIN MOV INTO NUMREG==NUMREG
JOIN CLIFO TO MOV INTO TIPOCF==TIPO CODCF==CODCF</sql>
</report>

37
ic/ic0200.cpp Normal file

@ -0,0 +1,37 @@
#include <applicat.h>
#include <report.h>
#include "ic0.h"
class TICpag_report : public TReport
{
protected:
virtual bool use_mask() { return false; }
public:
TICpag_report(const char* n) { load(n); }
};
class TICpag_print : public TSkeleton_application
{
public:
virtual void main_loop();
};
void TICpag_print::main_loop()
{
TMask m("ic0100a");
while (m.run() == K_ENTER)
{
TICpag_report r("ic0200p");
r.mask2report(m);
r.print_or_preview();
}
}
int ic0200(int argc, char* argv[])
{
TICpag_print a;
a.run(argc, argv, TR("Stampa pagamenti IVA per cassa"));
return 0;
}

97
ic/ic0200p.rep Normal file

@ -0,0 +1,97 @@
<?xml version="1.0" encoding="UTF-8" ?>
<report name="ic0200p" lpi="6">
<font face="Arial" size="10" />
<section type="Head" pattern="1" />
<section type="Head" level="1" pattern="1">
<field type="Stringa" align="center" width="90" height="2" pattern="1">
<font face="Arial" bold="1" size="20" />
<source>IF(#TIPOIVA==1,"INCASSI", "PAGAMENTI") + " CON IVA " + IF(#TIPODIFF==1,"DIFFERITA", "PER CASSA")</source>
</field>
<field type="Stringa" align="center" y="2" width="90" height="1" pattern="1">
<font face="Arial" bold="1" size="10" />
<source>IF(#DAL="",""," DAL "+#DAL) + IF(#AL="","", " AL "+#AL)</source>
</field>
</section>
<section type="Head" level="2" pattern="1">
<groupby>NUMREG</groupby>
<font face="Arial" bold="1" size="10" />
<field border="3" y="0.5" type="Linea" width="90" height="0" pattern="1" />
<field y="1" type="Testo" width="8" pattern="1" text="Fattura" />
<field x="8" y="1" type="Stringa" width="10" pattern="1">
<source>MOV.NUMDOC</source>
</field>
<field x="19" y="1" type="Testo" width="3" pattern="1" text="del" />
<field x="22" y="1" type="Data" width="10" pattern="1">
<source>MOV.DATADOC</source>
</field>
<field x="40" y="1" type="Stringa" width="50" pattern="1">
<source>CLIFO.RAGSOC</source>
</field>
<field x="19" y="2" type="Testo" width="7" pattern="1" text="Sezione" />
<field x="25" y="2" type="Testo" align="right" width="15" pattern="1" text="Importo" />
<field x="40" y="2" type="Testo" align="right" width="15" pattern="1" text="Imponibile" />
<field x="56" y="2" type="Testo" align="right" width="4" pattern="1" text="IVA" />
<field x="60" y="2" type="Testo" align="right" width="15" pattern="1" text="Imposta" />
<field x="80" y="2" type="Testo" align="left" width="6" pattern="1" text="Chiusa" />
<field y="3" type="Numero" align="right" link="MOV.NUMREG" width="7" pattern="1" hide_zero="1">
<source>NUMREG</source>
</field>
<field x="8" y="3" type="Data" width="10" pattern="1">
<source>DATAREG</source>
</field>
<field x="19" y="3" type="Array" width="5" pattern="1">
<source>IF(#TIPOIVA==1,"D","A")</source>
<list>
<li Value="Dare" Code="D" />
<li Value="Avere" Code="A" />
</list>
</field>
<field x="25" y="3" type="Valuta" align="right" width="15" pattern="1" text="###.###.###,@@">
<source>MOV.TOTDOC</source>
</field>
<field x="83" y="3" valign="center" type="Booleano" width="1" pattern="1">
<source>CHIUSA</source>
</field>
<field border="1" y="4.5" type="Linea" width="90" height="0" pattern="1" />
</section>
<section type="Body" pattern="1" />
<section type="Body" level="1" pattern="1">
<field type="String" align="right" link="MOV.NUMREG" width="7" pattern="1" hide_zero="1">
<source>IF(NUMREGP==NUMREG,"",NUMREGP)</source>
</field>
<field x="8" type="Data" width="10" pattern="1">
<source>DATAREGP</source>
</field>
<field x="19" type="Array" width="5" pattern="1">
<source>SEZIONE</source>
<list>
<li Value="Dare" Code="D" />
<li Value="Avere" Code="A" />
</list>
</field>
<field x="25" type="Valuta" align="right" width="15" pattern="1" text="###.###.###,@@">
<source>IMPORTO</source>
</field>
<field x="40" type="Valuta" align="right" width="15" pattern="1" text="###.###.###,@@">
<source>IMPONIBILE</source>
</field>
<field x="56" type="Stringa" align="right" width="4" pattern="1">
<source>CODIVA</source>
</field>
<field x="60" type="Valuta" align="right" width="15" pattern="1" text="###.###.###,@@">
<source>IMPOSTA</source>
</field>
<field x="83" type="Booleano" valign="center" width="1" pattern="1">
<source>CHIUSA</source>
</field>
</section>
<section type="Foot" pattern="1" />
<section type="Foot" level="1" pattern="1" />
<section type="Foot" level="2" pattern="1" />
<sql>USE IVADIFF SELECT (BETWEEN(DATAREGP,#DAL,#AL))&#26;&#26;(TIPOIVA==#TIPOIVA)&#26;&#26;(TIPODIFF==#TIPODIFF)&#26;&#26;(NUMPRO>0)&#26;&#26;((CHIUSA=#CHIUSA)||(#CHIUSA="T"))
BY NUMREG DATAREGP
JOIN MOV INTO NUMREG==NUMREG
JOIN CLIFO TO MOV INTO TIPOCF==TIPO CODCF==CODCF</sql>
</report>

@ -4,3 +4,4 @@ Picture = <cg02>
Module = ic
Flags = ""
Item_01 = "Stampa movimenti", "ic0 -0", "F"
Item_02 = "Stampa pagamenti", "ic0 -1", "F"