Migliorata stampa contratti per cliente, incorporando personalizzazione LIF

git-svn-id: svn://10.65.10.50/branches/R_10_00@23080 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2015-05-07 13:20:33 +00:00
parent 4169ad44c7
commit 0942d486bf
4 changed files with 162 additions and 159 deletions

View File

@ -38,14 +38,10 @@ long lv_new_contract(long cliente, int indsped)
}
else //altrimenti cerco il codcont più grande di un determinato cliente
{
TString query;
query<<"USE LVCONDV\n"
<<"FROM CODCF=#CLIENTE\n"
<<"TO CODCF=#CLIENTE\n";
TISAM_recordset recset (query);
recset.set_var("#CLIENTE",cliente);
if (recset.move_last())
codcont=recset.get("CODCONT").as_int();
TISAM_recordset recset ("USE LVCONDV\nFROM CODCF=#CLIENTE\nTO CODCF=#CLIENTE");
recset.set_var("#CLIENTE",cliente);
if (recset.move_last())
codcont=recset.get("CODCONT").as_int();
}
codcont++;
return codcont;
@ -1430,13 +1426,13 @@ bool TContratti_app::kill_planning (TISAM_recordset& selrighe) const
const int righe = selrighe.items();
if (righe > 0)
{
TProgind pi(righe, TR("Eliminazione planning in corso..."), true, true);
TProgress_monitor pi(righe, TR("Eliminazione planning in corso..."));
TLocalisamfile& rplan = selrighe.cursor()->file();
for (bool ok = selrighe.move_last(); ok; ok = selrighe.move_prev())
{
if (!pi.addstatus(1))
break;
rplan.remove();
if (!pi.add_status())
break;
}
}
return true;

View File

@ -4,4 +4,6 @@
#define F_DARAGSOC 202
#define F_ACODCF 203
#define F_ARAGSOC 204
#define F_DASCAD 205
#define F_ASCAD 206
#define F_ANNOES 207

View File

@ -1,129 +1,132 @@
<?xml version="1.0" encoding="UTF-8" ?>
<report name="lv0400g" lpi="6">
<font face="Courier New" size="10" />
<section type="Head" pattern="1" />
<section type="Head" level="1" pattern="1" />
<section type="Body" pattern="1" />
<section type="Body" level="1" page_break="1" pattern="1">
<field x="1" type="Testo" align="center" width="91" height="1.5" pattern="1" text="Stampa Contratti per Cliente">
<font italic="1" face="Times New Roman" bold="1" size="12" />
</field>
<field border="2" x="1" y="1.75" type="Linea" width="91" height="0" pattern="1" />
<field x="1" y="2.5" type="Testo" width="7" height="1.25" pattern="1" text="Cliente:">
<font face="Times New Roman" size="10" />
</field>
<field x="6.5" y="2.5" type="Numero" align="right" width="6" height="1.25" pattern="1">
<font face="Times New Roman" size="10" />
<source>LVCONDV.CODCF</source>
</field>
<field x="13.5" y="2.5" type="Stringa" width="50" height="1.25" pattern="1">
<font face="Times New Roman" bold="1" size="10" />
<source>CLIFO.RAGSOC</source>
</field>
<field x="76" y="2.5" type="Testo" width="10" height="1.25" pattern="1" text="Sconto:">
<font face="Times New Roman" size="10" />
</field>
<field border="2" x="1" y="4" type="Linea" width="91" height="0" pattern="1" />
<field x="1" y="4.5" type="Testo" align="right" width="10" pattern="1" text="Art.">
<font face="Times New Roman" size="7" />
</field>
<field x="12" y="4.5" type="Testo" width="25" pattern="1" text="Descrizione">
<font face="Times New Roman" size="7" />
</field>
<field x="39" y="4.5" type="Testo" align="right" width="4" pattern="1" text="Col.">
<font face="Times New Roman" size="7" />
</field>
<field x="45" y="4.5" type="Testo" align="right" width="4" pattern="1" text="Dot.">
<font face="Times New Roman" size="7" />
</field>
<field x="51" y="4.5" type="Testo" align="right" width="4" pattern="1" text="D.Temp.">
<font face="Times New Roman" size="7" />
</field>
<field x="57" y="4.5" type="Testo" align="right" width="4" pattern="1" text="C.Mese">
<font face="Times New Roman" size="7" />
</field>
<field x="63" y="4.5" type="Testo" align="right" width="4" pattern="1" text="C.Anno">
<font face="Times New Roman" size="7" />
</field>
<field x="69" y="4.5" type="Testo" align="right" width="4" pattern="1" text="Prz.">
<font face="Times New Roman" size="7" />
</field>
<field x="75" y="4.5" type="Testo" align="right" width="4" pattern="1" text="Cicl.">
<font face="Times New Roman" size="7" />
</field>
<field x="81" y="4.5" type="Testo" align="right" width="4" pattern="1" text="V.Conv.">
<font face="Times New Roman" size="7" />
</field>
<field x="87" y="4.5" type="Testo" align="right" width="4" pattern="1" text="% Forf.">
<font face="Times New Roman" size="7" />
</field>
</section>
<section type="Head" level="11" pattern="1" />
<section type="Body" level="11" pattern="1">
<sql>USE LVRCONDV
JOIN ANAMAG INTO CODART==CODART
FROM CODCF=#PARENT.CODCF CODCONT=#PARENT.CODCONT
TO CODCF=#PARENT.CODCF CODCONT=#PARENT.CODCONT
</sql>
<field x="1" type="Stringa" align="right" width="10" pattern="1">
<font face="Times New Roman" size="7" />
<source>LVRCONDV.CODART</source>
</field>
<field x="12" type="Stringa" dynamic_height="1" width="25" pattern="1">
<font face="Times New Roman" size="7" />
<source>ANAMAG.DESCR+ANAMAG.DESCRAGG</source>
</field>
<field x="39" type="Testo" align="right" width="4" pattern="1" text="0">
<font face="Times New Roman" size="7" />
</field>
<field x="51" type="Numero" align="right" width="4" pattern="1">
<font face="Times New Roman" size="7" />
<source>#DOTMP</source>
</field>
<field x="57" type="Numero" align="right" width="4" pattern="1">
<font face="Times New Roman" size="7" />
<source>#CONSMESE</source>
</field>
<field x="63" type="Numero" align="right" width="4" pattern="1">
<font face="Times New Roman" size="7" />
<source>#CONSANNO</source>
</field>
<field x="69" type="Prezzo" align="right" width="4" pattern="1" text="#########,@@">
<font face="Times New Roman" size="7" />
<source>LVRCONDV.PREZZO</source>
</field>
<field x="75" type="Numero" align="right" width="4" pattern="1">
<font face="Times New Roman" size="7" />
<source>LVRCONDV.MINCIC</source>
</field>
<field x="88" type="Numero" align="right" width="4" pattern="1">
<font face="Times New Roman" size="7" />
<source>LVRCONDV.FORFPERCL</source>
</field>
<field x="45" type="Numero" align="right" width="4" id="101" pattern="1">
<font face="Times New Roman" size="7" />
<source>#DOTOD</source>
</field>
<field x="81" type="Prezzo" align="right" width="5" id="102" pattern="1" text="#########,@@">
<font face="Times New Roman" size="7" />
<source>LVRCONDV.VALCONV*#101</source>
<postscript description="B11.102 POSTSCRIPT">MESSAGE ADD,F11.102</postscript>
</field>
</section>
<section type="Foot" level="11" pattern="1">
<field type="Testo" width="10" pattern="1" text="Totale">
<font face="Calibri" size="11" />
</field>
<field x="76" type="Prezzo" align="right" width="10" id="102" pattern="1" text="#########,@@">
<font face="Calibri" size="11" />
</field>
</section>
<section type="Foot" pattern="1" />
<section type="Foot" level="1" pattern="1" />
<sql>USE LVCONDV
JOIN CLIFO INTO TIPOCF=="C" CODCF==CODCF
FROM CODCF=#F_CODCF_FROM
TO CODCF=#F_CODCF_TO
</sql>
<?xml version="1.0" encoding="UTF-8" ?>
<report name="LV0400G" lpi="6">
<font face="Courier New" size="10" />
<section type="Head" pattern="1" />
<section type="Head" level="1" pattern="1" />
<section type="Body" pattern="1" />
<section type="Body" level="1" page_break="1" pattern="1">
<field x="1" type="Testo" align="center" width="83" height="1.5" pattern="1" text="Stampa Contratti per Cliente">
<font italic="1" face="Times New Roman" bold="1" size="12" />
</field>
<field border="2" x="1" y="1.75" type="Linea" width="83" height="0" pattern="1" />
<field x="63.5" y="1.75" type="Testo" width="6" height="1.25" pattern="1" text="Sconto:">
<font face="Times New Roman" size="10" />
</field>
<field x="69" y="1.75" type="Stringa" width="14" pattern="1">
<source>CFVEN.SCONTO</source>
</field>
<field x="1" y="2.5" type="Testo" width="7" height="1.25" pattern="1" text="Cliente:">
<font face="Times New Roman" size="10" />
</field>
<field x="6.5" y="2.5" type="Numero" align="right" width="6" height="1.25" pattern="1">
<font face="Times New Roman" size="10" />
<source>LVCONDV.CODCF</source>
</field>
<field x="13" y="2.5" type="Stringa" width="50" height="1.25" pattern="1">
<font face="Times New Roman" bold="1" size="10" />
<source>CLIFO.RAGSOC</source>
</field>
<field x="63.5" y="2.75" type="Testo" width="9.5" height="1.25" pattern="1" text="Scadenza:">
<font face="Times New Roman" size="10" />
</field>
<field x="70.5" y="2.75" type="Data" width="12.5" pattern="1">
<source>LVCONDV.DATASC</source>
</field>
<field border="2" x="1" y="4" type="Linea" width="83" height="0" pattern="1" />
<field y="4.5" type="Testo" width="8" pattern="1" text="Art.">
<font face="Times New Roman" size="7" />
</field>
<field x="10" y="4.5" type="Testo" width="25" pattern="1" text="Descrizione">
<font face="Times New Roman" size="7" />
</field>
<field x="35" y="4.5" type="Testo" width="6" pattern="1" text="Sconto">
<font face="Times New Roman" size="7" />
</field>
<field x="39" y="4.5" type="Testo" align="right" width="4" pattern="1" text="Dot.">
<font face="Times New Roman" size="7" />
</field>
<field x="45" y="4.5" type="Testo" align="right" width="4" pattern="1" text="C.Mese">
<font face="Times New Roman" size="7" />
</field>
<field x="51" y="4.5" type="Testo" align="right" width="4" pattern="1" text="C.Anno">
<font face="Times New Roman" size="7" />
</field>
<field x="57" y="4.5" type="Testo" align="right" width="4" pattern="1" text="Prz.">
<font face="Times New Roman" size="7" />
</field>
<field x="63" y="4.5" type="Testo" align="right" width="4" pattern="1" text="Cicl.">
<font face="Times New Roman" size="7" />
</field>
<field x="69" y="4.5" type="Testo" align="right" width="8" pattern="1" text="Prz. Nolo">
<font face="Times New Roman" size="7" />
</field>
<field x="78" y="4.5" type="Testo" align="right" width="5" pattern="1" text="V.Conv.">
<font face="Times New Roman" size="7" />
</field>
</section>
<section type="Head" level="11" pattern="1" />
<section type="Body" level="11" pattern="1">
<sql>USE LVRCONDV
JOIN ANAMAG INTO CODART==CODART
FROM CODCF=#PARENT.CODCF CODCONT=#PARENT.CODCONT
TO CODCF=#PARENT.CODCF CODCONT=#PARENT.CODCONT
</sql>
<field type="Stringa" width="9" pattern="1">
<font face="Times New Roman" size="7" />
<source>LVRCONDV.CODART</source>
</field>
<field x="10" type="Stringa" dynamic_height="1" width="25" height="3" pattern="1">
<font face="Times New Roman" size="7" />
<source>ANAMAG.DESCR+" "+TRIM(ANAMAG.DESCRAGG)</source>
</field>
<field x="35" type="Stringa" width="5" pattern="1">
<source>LVRCONDV.SCONTPERC</source>
</field>
<field x="45" type="Numero" align="right" width="4" pattern="1">
<font face="Times New Roman" size="7" />
<source>#CONSMESE</source>
</field>
<field x="51" type="Numero" align="right" width="4" pattern="1">
<font face="Times New Roman" size="7" />
<source>#CONSANNO</source>
</field>
<field x="57" type="Prezzo" align="right" width="4" pattern="1" text="#########,@@">
<font face="Times New Roman" size="7" />
<source>LVRCONDV.PREZZO</source>
</field>
<field x="63" type="Numero" align="right" width="4" pattern="1">
<font face="Times New Roman" size="7" />
<source>LVRCONDV.MINCIC</source>
</field>
<field x="69" type="Numero" align="right" width="7" pattern="1" text="#####,@@">
<font face="Times New Roman" size="7" />
<source>LVRCONDV.PREZNOL</source>
</field>
<field x="40" type="Numero" align="right" width="4" id="101" pattern="1">
<font face="Times New Roman" size="7" />
<source>#DOTOD</source>
</field>
<field x="77" type="Prezzo" align="right" width="6" id="102" pattern="1" text="#########,@@">
<font face="Times New Roman" size="7" />
<source>LVRCONDV.VALCONV*#101</source>
<postscript description="B11.102 POSTSCRIPT">MESSAGE ADD,F11.102</postscript>
</field>
</section>
<section type="Foot" level="11" pattern="1">
<field x="10" type="Testo" width="10" pattern="1" text="Totale">
<font face="Courier New" bold="1" size="11" />
</field>
<field x="76" type="Prezzo" align="right" width="7" id="102" pattern="1" text="###.###.###,@@">
<font face="Times New Roman" bold="1" size="7" />
</field>
</section>
<section type="Foot" pattern="1" />
<section type="Foot" level="1" pattern="1" />
<sql>USE LVCONDV SELECT BETWEEN(DATASC,#DASCAD,#ASCAD)*(20->CODCF>0)
JOIN CLIFO INTO TIPOCF=="C" CODCF==CODCF
JOIN CFVEN INTO TIPOCF=="C" CODCF==CODCF
FROM CODCF=#F_CODCF_FROM
TO CODCF=#F_CODCF_TO
</sql>
</report>

View File

@ -6,9 +6,9 @@ ENDPAGE
PAGE "Stampa Contratti per Cliente" -1 -1 40 5
GROUPBOX DLG_NULL 85 5
GROUPBOX DLG_NULL 78 6
BEGIN
PROMPT 1 1 "@b Parametri Estrazione"
PROMPT 1 1 "@bParametri Estrazione"
END
NUMBER F_DACODCF 6
@ -21,25 +21,25 @@ BEGIN
INPUT CODCF F_DACODCF
DISPLAY "Codice" CODCF
DISPLAY "Ragione Sociale@50" RAGSOC
DISPLAY "Partita IVA@11" PAIV
DISPLAY "Partita IVA" PAIV
OUTPUT F_DACODCF CODCF
OUTPUT F_DARAGSOC RAGSOC
CHECKTYPE REQUIRED
CHECKTYPE NORMAL
FIELD #F_CODCF_FROM
END
STRING F_DARAGSOC 50
BEGIN
PROMPT 30 2 ""
PROMPT 24 2 ""
KEY 2
USE LF_CLIFO KEY 2
INPUT TIPOCF "C"
INPUT RAGSOC F_DARAGSOC
DISPLAY "Ragione Sociale@50" RAGSOC
DISPLAY "Partita IVA@11" PAIV
DISPLAY "Partita IVA" PAIV
DISPLAY "Codice" CODCF
COPY OUTPUT F_DACODCF
CHECKTYPE REQUIRED
CHECKTYPE NORMAL
END
NUMBER F_ACODCF 6
@ -52,33 +52,35 @@ BEGIN
INPUT CODCF F_ACODCF
DISPLAY "Codice" CODCF
DISPLAY "Ragione Sociale@50" RAGSOC
DISPLAY "Partita IVA@11" PAIV
DISPLAY "Partita IVA" PAIV
OUTPUT F_ACODCF CODCF
OUTPUT F_ARAGSOC RAGSOC
CHECKTYPE REQUIRED
CHECKTYPE NORMAL
FIELD #F_CODCF_TO
END
STRING F_ARAGSOC 50
BEGIN
PROMPT 30 3 ""
PROMPT 24 3 ""
KEY 2
USE LF_CLIFO KEY 2
COPY USE F_DARAGSOC
INPUT TIPOCF "C"
INPUT RAGSOC F_ARAGSOC
DISPLAY "Ragione Sociale@50" RAGSOC
DISPLAY "Partita IVA@11" PAIV
DISPLAY "Codice" CODCF
COPY DISPLAY F_DARAGSOC
COPY OUTPUT F_ACODCF
CHECKTYPE REQUIRED
CHECKTYPE NORMAL
END
NUMBER F_ANNOES 4
DATE F_DASCAD
BEGIN
PROMPT 2 6 "Anno Es"
FLAGS "A"
FIELD #F_ANNO
FLAGS "H"
PROMPT 2 4 "Dalla scadenza contratto "
FIELD #DASCAD
END
DATE F_ASCAD
BEGIN
PROMPT 2 5 "Alla scadenza contratto "
FIELD #ASCAD
END
ENDPAGE