Nuova gestione preventivazione
git-svn-id: svn://10.65.10.50/branches/R_10_00@22887 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
68f38a695b
commit
59a06f9def
6
pe/pe0.h
6
pe/pe0.h
@ -1,8 +1,8 @@
|
|||||||
#ifndef __LV3_H
|
#ifndef __PE0_H
|
||||||
#define __LV3_H
|
#define __PE0_H
|
||||||
|
|
||||||
int pe0400(int argc, char* argv[]);
|
int pe0400(int argc, char* argv[]);
|
||||||
int pe0500(int argc, char* argv[]);
|
int pe0500(int argc, char* argv[]);
|
||||||
int pe0600(int argc, char* argv[]);
|
int pe0600(int argc, char* argv[]);
|
||||||
|
|
||||||
#endif // __LV3_H
|
#endif // __PE0_H
|
||||||
|
@ -108,8 +108,7 @@ public:
|
|||||||
inline TGestione_preventivo_app& peapp() { return (TGestione_preventivo_app &)main_app(); };
|
inline TGestione_preventivo_app& peapp() { return (TGestione_preventivo_app &)main_app(); };
|
||||||
|
|
||||||
//////////////////////////////////////////
|
//////////////////////////////////////////
|
||||||
//// CLASSE TGestione_preventivo_MSK ////
|
//// CLASSE TGestione_preventivo_MSK ////
|
||||||
|
|
||||||
//////////////////////////////////////////
|
//////////////////////////////////////////
|
||||||
|
|
||||||
const TString & TGestione_preventivo_msk::build_tree_string(int level)
|
const TString & TGestione_preventivo_msk::build_tree_string(int level)
|
||||||
|
14
pe/pe1.cpp
Normal file
14
pe/pe1.cpp
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#include <xvt.h>
|
||||||
|
|
||||||
|
#include "pe1.h"
|
||||||
|
|
||||||
|
int main(int argc, char** argv)
|
||||||
|
{
|
||||||
|
const int r = (argc > 1) ? argv[1][1] - '0' : 0;
|
||||||
|
switch (r)
|
||||||
|
{
|
||||||
|
case 3:
|
||||||
|
default: pe1400(argc, argv); break; // gestione preventivi
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
6
pe/pe1.h
Normal file
6
pe/pe1.h
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#ifndef __PE1_H
|
||||||
|
#define __PE1_H
|
||||||
|
|
||||||
|
int pe1400(int argc, char* argv[]); // gestione preventivi
|
||||||
|
|
||||||
|
#endif
|
1411
pe/pe1400.cpp
Normal file
1411
pe/pe1400.cpp
Normal file
File diff suppressed because it is too large
Load Diff
50
pe/pe1400.h
Normal file
50
pe/pe1400.h
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
#define F_PROVV 201
|
||||||
|
#define F_ANNO 202
|
||||||
|
#define F_CODNUM 203
|
||||||
|
#define F_DESNUM 204
|
||||||
|
#define F_TIPODOC 205
|
||||||
|
#define F_DESTIPO 206
|
||||||
|
#define F_NPREV 207
|
||||||
|
#define F_NREV 208
|
||||||
|
#define F_NDOC 209
|
||||||
|
#define F_STATO 210
|
||||||
|
#define F_DATADOC 211
|
||||||
|
|
||||||
|
#define F_CLIFO 220
|
||||||
|
#define F_RAGSOC 221
|
||||||
|
#define F_RICALT 222
|
||||||
|
#define F_STATOPAIV 223
|
||||||
|
#define F_PAIV 224
|
||||||
|
#define F_COFI 225
|
||||||
|
#define F_NOTE 226
|
||||||
|
#define F_CODPAG 227
|
||||||
|
#define F_DESPAG 228
|
||||||
|
#define F_CODLIS 229
|
||||||
|
#define F_DESLIS 230
|
||||||
|
#define F_RICARICO 234
|
||||||
|
#define F_TIPOCOSTO 235
|
||||||
|
#define F_NUMDOCRIF 236
|
||||||
|
#define F_DATADOCRIF 237
|
||||||
|
#define F_OGGETTI 238
|
||||||
|
|
||||||
|
#define F_FASENEW 240
|
||||||
|
#define F_FASEDIT 241
|
||||||
|
#define F_FASEDEL 242
|
||||||
|
#define F_FASEUP 244
|
||||||
|
#define F_FASEDN 245
|
||||||
|
#define F_FASELT 246
|
||||||
|
#define F_FASERT 247
|
||||||
|
#define F_FASEMAX 248
|
||||||
|
|
||||||
|
#define F_CDC0 250
|
||||||
|
|
||||||
|
#define F_FASI 400
|
||||||
|
#define F_DISTINTE 401
|
||||||
|
#define F_ARTICOLI 402
|
||||||
|
#define F_MISURE 403
|
||||||
|
|
||||||
|
#define S_CODART 101
|
||||||
|
#define S_DESCR 102
|
||||||
|
|
||||||
|
#define RPRV_COSTO "QTAGG5"
|
||||||
|
#define RPRV_LEVEL "PRIORITY"
|
570
pe/pe1400.rep
Normal file
570
pe/pe1400.rep
Normal file
@ -0,0 +1,570 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<report libraries="ve1300" name="pe1400" lpi="6">
|
||||||
|
<description>preventivo standard</description>
|
||||||
|
<font face="Courier New" size="10" />
|
||||||
|
<section type="Head" height="28" pattern="1">
|
||||||
|
<font face="Arial" size="10" />
|
||||||
|
<field x="90.5" y="19" type="Stringa" width="2" id="9" pattern="1">
|
||||||
|
<prescript description="H0.9 PRESCRIPT">MESSAGE _PAGENO</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="77" y="19" type="Data" width="10" id="10" pattern="1">
|
||||||
|
<font face="Arial" bold="1" size="10" />
|
||||||
|
<source>33.DATADOC</source>
|
||||||
|
</field>
|
||||||
|
<field x="67.5" y="19" type="Stringa" align="right" width="6.5" id="11" pattern="1">
|
||||||
|
<font face="Arial" bold="1" size="10" />
|
||||||
|
<source>33.NDOC</source>
|
||||||
|
</field>
|
||||||
|
<field x="43" y="19" type="Stringa" width="16" id="12" pattern="1">
|
||||||
|
<prescript description="H0.12 PRESCRIPT">MESSAGE _CLIENTE,COFI</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="59" y="19" type="Stringa" width="5" id="14" pattern="1">
|
||||||
|
<source>IF(33.CODVAL='','EURO',33.CODVAL)</source>
|
||||||
|
</field>
|
||||||
|
<field x="18" y="19" type="Stringa" align="right" width="6" id="15" pattern="1">
|
||||||
|
<source>33.CODCF</source>
|
||||||
|
</field>
|
||||||
|
<field x="28" y="19" type="Stringa" width="14" id="16" pattern="1">
|
||||||
|
<prescript description="H0.16 PRESCRIPT">MESSAGE _CLIENTE,PAIV</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="1" y="21.5" type="Stringa" width="41" id="17" pattern="1">
|
||||||
|
<source>201@.S0</source>
|
||||||
|
</field>
|
||||||
|
<field x="43" y="20.5" deactivated="1" type="Stringa" width="23" id="18" pattern="1">
|
||||||
|
<source>208@.S0</source>
|
||||||
|
</field>
|
||||||
|
<field x="50.5" y="27" deactivated="1" type="Stringa" width="45" id="18" pattern="1">
|
||||||
|
<source>208@.S0</source>
|
||||||
|
</field>
|
||||||
|
<field x="43" y="21.5" type="Stringa" width="51" id="19" pattern="1">
|
||||||
|
<groups>71</groups>
|
||||||
|
<source>204@.S0</source>
|
||||||
|
</field>
|
||||||
|
<field x="49" y="10.5" type="Stringa" width="59" height="2" id="20" pattern="1">
|
||||||
|
<font face="Arial" bold="1" size="10" />
|
||||||
|
<prescript description="H0.20 PRESCRIPT">MESSAGE _CLIENTE,!RAGSOC</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="49" y="12.5" type="Stringa" width="44" id="21" pattern="1">
|
||||||
|
<prescript description="H0.21 PRESCRIPT">MESSAGE _CLIENTE,!INDNUM</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="49" y="13.5" type="Stringa" width="44" id="22" pattern="1">
|
||||||
|
<prescript description="H0.22 PRESCRIPT">MESSAGE _CLIENTE,LOCALITACF</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="49" y="14.5" type="Stringa" width="5" id="23" pattern="1">
|
||||||
|
<prescript description="H0.23 PRESCRIPT">MESSAGE _CLIENTE,!CAP</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="55" y="14.5" type="Stringa" hidden="1" width="30" height="2" id="24" pattern="1">
|
||||||
|
<prescript description="H0.24 PRESCRIPT">MESSAGE _CLIENTE,!COM-E;DENCOM
|
||||||
|
MESSAGE COPY,26</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="55" y="14.5" type="Stringa" hidden="1" width="2" id="25" pattern="1">
|
||||||
|
<prescript description="H0.25 PRESCRIPT">MESSAGE _CLIENTE,!COM-E;PROVCOM
|
||||||
|
MESSAGE APPEND,26</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="55" y="14.5" type="Stringa" width="38" height="2" id="26" pattern="1" />
|
||||||
|
<field x="43" y="27" type="Stringa" hidden="1" width="3" id="27" pattern="1">
|
||||||
|
<prescript description="H0.27 PRESCRIPT">MESSAGE _CLIENTE,STATOCF</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="49" y="15.5" type="Stringa" width="25" id="28" pattern="1">
|
||||||
|
<prescript description="H0.28 PRESCRIPT">MESSAGE _TABLEREAD,%STA,#27,S0</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="1" y="19" type="Stringa" width="16" id="31" pattern="1">
|
||||||
|
<font face="Arial" bold="1" size="10" />
|
||||||
|
<source>210@.S0</source>
|
||||||
|
</field>
|
||||||
|
<field x="25.5" y="19" type="Stringa" width="2" id="33" pattern="1">
|
||||||
|
<prescript description="H0.33 PRESCRIPT">MESSAGE _CLIENTE,STATOPAIV</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="22.25" y="24.5" type="Stringa" width="70" id="36" pattern="1">
|
||||||
|
<source>212@.S0</source>
|
||||||
|
</field>
|
||||||
|
<field x="1" y="26.5" deactivated="1" type="Stringa" width="27" id="36" pattern="1">
|
||||||
|
<source>210@.S0</source>
|
||||||
|
</field>
|
||||||
|
<field x="21" y="20.5" deactivated="1" type="Stringa" width="21" id="37" pattern="1">
|
||||||
|
<source>211@.S0</source>
|
||||||
|
</field>
|
||||||
|
<field x="47.25" y="22.5" type="Stringa" width="34" id="62" pattern="1" text="## ## # ##### ##### ############">
|
||||||
|
<groups>70</groups>
|
||||||
|
<source>213@.S3</source>
|
||||||
|
</field>
|
||||||
|
<field x="43" y="22.5" type="Testo" width="4.5" id="63" pattern="1" text="Iban:">
|
||||||
|
<font italic="1" face="Arial" size="8" />
|
||||||
|
<groups>70</groups>
|
||||||
|
</field>
|
||||||
|
<field x="59" y="22.5" type="Numero" align="right" width="6.5" id="64" pattern="1" hide_zero="1" text="@@@@@">
|
||||||
|
<groups>71</groups>
|
||||||
|
<source>33.CODCABA</source>
|
||||||
|
</field>
|
||||||
|
<field x="47.25" y="22.5" type="Numero" align="right" width="6.5" id="65" pattern="1" hide_zero="1" text="@@@@@">
|
||||||
|
<groups>71</groups>
|
||||||
|
<source>33.CODABIA</source>
|
||||||
|
</field>
|
||||||
|
<field x="1.25" y="24.5" type="Stringa" width="20.5" id="65" pattern="1">
|
||||||
|
<source>33.CODCMS</source>
|
||||||
|
</field>
|
||||||
|
<field x="71" y="22.5" type="Stringa" align="right" width="16.5" id="66" pattern="1">
|
||||||
|
<groups>71</groups>
|
||||||
|
<source>33.IBAN[16,]+' CIN:'+33.IBAN[5,5]</source>
|
||||||
|
</field>
|
||||||
|
<field x="43" y="22.5" type="Testo" width="3.5" id="67" pattern="1" text="Abi:">
|
||||||
|
<font italic="1" face="Arial" size="8" />
|
||||||
|
<groups>71</groups>
|
||||||
|
</field>
|
||||||
|
<field x="55" y="22.5" type="Testo" width="4" id="68" pattern="1" text="Cab:">
|
||||||
|
<font italic="1" face="Arial" size="8" />
|
||||||
|
<groups>71</groups>
|
||||||
|
</field>
|
||||||
|
<field x="66.75" y="22.5" type="Testo" width="4.5" id="69" pattern="1" text="CF;C">
|
||||||
|
<font italic="1" face="Arial" size="8" />
|
||||||
|
<groups>71</groups>
|
||||||
|
</field>
|
||||||
|
<field x="28.5" y="22.5" type="Array" hidden="1" width="3" id="117" pattern="1">
|
||||||
|
<source>201@.S4</source>
|
||||||
|
<list>
|
||||||
|
<li Value=" " Code=" ">MESSAGE HIDE,71@|HIDE,70@</li>
|
||||||
|
<li Value="1" Code="1">MESSAGE HIDE,71@|SHOW,70@</li>
|
||||||
|
<li Value="3" Code="3">MESSAGE HIDE,70@|SHOW,71@</li>
|
||||||
|
<li Value="9" Code="9">MESSAGE HIDE,71@|SHOW,70@ </li>
|
||||||
|
</list>
|
||||||
|
</field>
|
||||||
|
<field x="32" y="22.5" type="Stringa" hidden="1" width="10" id="119" pattern="1">
|
||||||
|
<source>33.CODABIP+33.CODCABP</source>
|
||||||
|
</field>
|
||||||
|
<field x="43" y="21.5" type="Stringa" width="51" id="129" pattern="1">
|
||||||
|
<groups>70</groups>
|
||||||
|
<prescript description="H0.129 PRESCRIPT">MESSAGE TABLEREAD,%BAN,#119,S0</prescript>
|
||||||
|
</field>
|
||||||
|
</section>
|
||||||
|
<section type="Head" level="1" pattern="1" />
|
||||||
|
<section type="Body" pattern="1">
|
||||||
|
<field border="1" x="3" y="1" type="Rettangolo" bg_color="#C0C0C0" width="40" height="5" pattern="5" />
|
||||||
|
<field x="12.5" y="3" type="Testo" width="20" pattern="1" text="Logo Personalizzato">
|
||||||
|
<font face="Courier New" bold="1" size="10" />
|
||||||
|
</field>
|
||||||
|
<field x="3.5" y="6.5" type="Testo" width="16.5" pattern="1" text="INTESTAZIONE DITTA">
|
||||||
|
<font face="Times New Roman" bold="1" size="9" />
|
||||||
|
</field>
|
||||||
|
<field x="3.5" y="7.25" type="Testo" width="13" pattern="1" text="Via ">
|
||||||
|
<font face="Times New Roman" size="8" />
|
||||||
|
</field>
|
||||||
|
<field x="3.5" y="8" type="Testo" width="33" pattern="1" text="CAP COMUNE PROV Italy">
|
||||||
|
<font face="Times New Roman" size="8" />
|
||||||
|
</field>
|
||||||
|
<field x="3.5" y="8.75" type="Testo" width="33" pattern="1" text="Tel. +39 xxxxxxx Fax +39 xxxxxxxxxxxxxxx">
|
||||||
|
<font face="Times New Roman" size="8" />
|
||||||
|
</field>
|
||||||
|
<field x="3.5" y="9.5" type="Testo" width="33" pattern="1" text="P.IVA 01234567890 Trib. XX n. 12345 CCIAA n. 123456">
|
||||||
|
<font face="Times New Roman" size="8" />
|
||||||
|
</field>
|
||||||
|
<field x="3.5" y="10.25" type="Testo" width="33" pattern="1" text="Cap. Soc. Euro 99.999 i.v.">
|
||||||
|
<font face="Times New Roman" size="8" />
|
||||||
|
</field>
|
||||||
|
<field x="3.5" y="11" type="Testo" width="33" pattern="1" text="www.vostraditta.com info@vostraditta.com">
|
||||||
|
<font face="Times New Roman" size="8" />
|
||||||
|
</field>
|
||||||
|
<field border="1" radius="100" x="0.5" y="18" type="Rettangolo" shade_offset="50" width="92" height="8" pattern="2" />
|
||||||
|
<field border="1" x="0.5" y="20.5" type="Linea" width="92" height="0" pattern="1" />
|
||||||
|
<field border="1" x="0.5" y="23.5" type="Linea" width="92" height="0" pattern="1" />
|
||||||
|
<field border="1" radius="100" x="0.5" y="26.5" type="Rettangolo" shade_offset="50" width="92" height="23.5" pattern="2" />
|
||||||
|
<field border="1" radius="100" x="0.5" y="51" type="Rettangolo" shade_offset="50" width="92" height="14.5" pattern="2" />
|
||||||
|
<field border="1" x="0.75" y="53" type="Linea" width="92" height="0" pattern="1" />
|
||||||
|
<field border="1" x="6.5" y="53" type="Linea" height="6" pattern="1" />
|
||||||
|
<field border="1" x="19" y="53" type="Linea" height="6" pattern="1" />
|
||||||
|
<field border="1" x="34.5" y="53" type="Linea" height="6" pattern="1" />
|
||||||
|
<field border="1" x="40.5" y="53" type="Linea" height="6" pattern="1" />
|
||||||
|
<field border="1" x="75.25" y="53" type="Linea" height="6" pattern="1" />
|
||||||
|
<field border="1" x="0.75" y="59" type="Linea" width="92" height="0" pattern="1" />
|
||||||
|
<field border="1" radius="100" x="76" y="59.25" type="Rettangolo" bg_color="#E0E0E0" shade_offset="30" width="16" height="2.75" pattern="2" />
|
||||||
|
<field border="1" x="0.75" y="62.25" type="Linea" width="92" height="0" pattern="1" />
|
||||||
|
<field x="1" y="62.5" type="Testo" width="50" pattern="1" text="CONTRIBUTO CONAI ASSOLTO OVE DOVUTO">
|
||||||
|
<font face="Arial" bold="1" size="10" />
|
||||||
|
</field>
|
||||||
|
<field x="1" y="63.5" type="Array" width="50" pattern="1">
|
||||||
|
<font face="Arial" bold="1" size="10" />
|
||||||
|
<source>33.IVAXCASSA</source>
|
||||||
|
<list>
|
||||||
|
<li />
|
||||||
|
<li Value="Operazione con IVA per cassa, di cui all'art. 32-bis del D.L. 83F;2012" Code="X" />
|
||||||
|
</list>
|
||||||
|
</field>
|
||||||
|
<field border="1" radius="100" x="45.5" y="9.5" type="Rettangolo" shade_offset="50" width="47" height="8" id="50" pattern="2" />
|
||||||
|
<field x="49" y="9" type="Testo" width="16" id="53" pattern="2" text=" Intestatario Documento">
|
||||||
|
<font italic="1" face="Arial" size="8" />
|
||||||
|
</field>
|
||||||
|
<field x="1" y="18.25" type="Testo" width="11" id="53" pattern="1" text="Tipo Documento">
|
||||||
|
<font italic="1" face="Arial" size="8" />
|
||||||
|
</field>
|
||||||
|
<field x="17.5" y="18.25" type="Testo" width="8" id="53" pattern="1" text="Cod.Cliente">
|
||||||
|
<font italic="1" face="Arial" size="8" />
|
||||||
|
</field>
|
||||||
|
<field x="29" y="18.25" type="Testo" width="8.5" id="53" pattern="1" text="P.IVA">
|
||||||
|
<font italic="1" face="Arial" size="8" />
|
||||||
|
</field>
|
||||||
|
<field x="42.75" y="18.25" type="Testo" width="8.5" id="53" pattern="1" text="Cod. Fis:">
|
||||||
|
<font italic="1" face="Arial" size="8" />
|
||||||
|
</field>
|
||||||
|
<field x="59.5" y="18.25" type="Testo" width="5" id="53" pattern="1" text="Valuta">
|
||||||
|
<font italic="1" face="Arial" size="8" />
|
||||||
|
</field>
|
||||||
|
<field x="69.5" y="18.25" type="Testo" width="6" id="53" pattern="1" text="Numero">
|
||||||
|
<font italic="1" face="Arial" size="8" />
|
||||||
|
</field>
|
||||||
|
<field x="79" y="18.25" type="Testo" width="7" id="53" pattern="1" text="Data">
|
||||||
|
<font italic="1" face="Arial" size="8" />
|
||||||
|
</field>
|
||||||
|
<field x="88" y="18.25" type="Testo" width="5" id="53" pattern="1" text="Pagina">
|
||||||
|
<font italic="1" face="Arial" size="8" />
|
||||||
|
</field>
|
||||||
|
<field x="1" y="20.5" type="Testo" width="8" id="53" pattern="1" text="Pagamento">
|
||||||
|
<font italic="1" face="Arial" size="8" />
|
||||||
|
</field>
|
||||||
|
<field x="43" y="20.5" type="Testo" width="8" id="53" pattern="1" text="Banca">
|
||||||
|
<font italic="1" face="Arial" size="8" />
|
||||||
|
</field>
|
||||||
|
<field x="1" y="23.5" type="Testo" width="8" id="53" pattern="1" text="Commessa">
|
||||||
|
<font italic="1" face="Arial" size="8" />
|
||||||
|
</field>
|
||||||
|
<field x="2.5" y="51.25" type="Testo" width="10" id="53" pattern="1" text="Totale Merce">
|
||||||
|
<font italic="1" face="Arial" size="8" />
|
||||||
|
</field>
|
||||||
|
<field x="14" y="51.25" type="Testo" width="6" id="53" pattern="1" text="Sconto %">
|
||||||
|
<font italic="1" face="Arial" size="8" />
|
||||||
|
</field>
|
||||||
|
<field x="21.5" y="51.25" type="Testo" align="right" width="10" id="53" pattern="1" text="Netto Merce">
|
||||||
|
<font italic="1" face="Arial" size="8" />
|
||||||
|
</field>
|
||||||
|
<field x="33" y="51.25" type="Testo" width="7.5" id="53" pattern="1" text="Spese Varie">
|
||||||
|
<font italic="1" face="Arial" size="8" />
|
||||||
|
</field>
|
||||||
|
<field x="44.5" y="51.25" type="Testo" width="10.5" id="53" pattern="1" text="Spese Trasporto">
|
||||||
|
<font italic="1" face="Arial" size="8" />
|
||||||
|
</field>
|
||||||
|
<field x="61.5" y="51.25" type="Testo" width="11" id="53" pattern="1" text="Totale Imponibile">
|
||||||
|
<font italic="1" face="Arial" size="8" />
|
||||||
|
</field>
|
||||||
|
<field x="81" y="51.25" type="Testo" width="10.5" id="53" pattern="1" text="Totale Imposta">
|
||||||
|
<font italic="1" face="Arial" size="8" />
|
||||||
|
</field>
|
||||||
|
<field x="1" y="53.25" type="Testo" width="6" id="53" pattern="1" text="Cod.IVA">
|
||||||
|
<font italic="1" face="Arial" size="8" />
|
||||||
|
</field>
|
||||||
|
<field x="7.25" y="53.25" type="Testo" width="12" id="53" pattern="1" text="Spese Accessorie">
|
||||||
|
<font italic="1" face="Arial" size="8" />
|
||||||
|
</field>
|
||||||
|
<field x="19.25" y="53.25" type="Testo" align="center" width="15" id="53" pattern="1" text="Imponibile">
|
||||||
|
<font italic="1" face="Arial" size="8" />
|
||||||
|
</field>
|
||||||
|
<field x="36.25" y="53.25" type="Testo" width="3" id="53" pattern="1" text="IVA">
|
||||||
|
<font italic="1" face="Arial" size="8" />
|
||||||
|
</field>
|
||||||
|
<field x="41.5" y="53.25" type="Testo" width="17" id="53" pattern="1" text="Imposta">
|
||||||
|
<font italic="1" face="Arial" size="8" />
|
||||||
|
</field>
|
||||||
|
<field x="76.75" y="53.28" type="Testo" width="16" id="53" pattern="1" text="Bolli">
|
||||||
|
<font italic="1" face="Arial" size="8" />
|
||||||
|
</field>
|
||||||
|
<field x="76.75" y="55.75" type="Testo" width="6.5" id="53" pattern="1" text="Acconto">
|
||||||
|
<font italic="1" face="Arial" size="8" />
|
||||||
|
</field>
|
||||||
|
<field x="1.25" y="59.25" type="Testo" width="22.5" id="53" pattern="1" text="Scadenza Rate e Relativo Importo">
|
||||||
|
<font italic="1" face="Arial" size="8" />
|
||||||
|
</field>
|
||||||
|
<field x="78.25" y="59.5" type="Testo" width="12.5" id="53" pattern="1" text="Totale Documento">
|
||||||
|
<font italic="1" face="Arial" size="8" />
|
||||||
|
</field>
|
||||||
|
<field x="1.5" y="27" type="Testo" width="8" id="202" pattern="1" text="Fase">
|
||||||
|
<font face="Arial" bold="1" size="8" />
|
||||||
|
</field>
|
||||||
|
<field x="17.5" y="27" type="Testo" width="28.5" id="203" pattern="1" text="Descrizione">
|
||||||
|
<font face="Arial" bold="1" size="8" />
|
||||||
|
</field>
|
||||||
|
<field x="53.75" y="27" type="Testo" width="3.5" id="204" pattern="1" text="UM">
|
||||||
|
<font face="Arial" bold="1" size="8" />
|
||||||
|
</field>
|
||||||
|
<field x="58.25" y="27" type="Testo" width="6" id="209" pattern="1" text="Quantit&#E0;">
|
||||||
|
<font face="Arial" bold="1" size="8" />
|
||||||
|
</field>
|
||||||
|
<field x="68" y="27" type="Testo" width="5.5" id="209" pattern="1" text="Prezzo">
|
||||||
|
<font face="Arial" bold="1" size="8" />
|
||||||
|
</field>
|
||||||
|
<field x="80.5" y="27" type="Testo" width="5.5" id="209" pattern="1" text="Importo">
|
||||||
|
<font face="Arial" bold="1" size="8" />
|
||||||
|
</field>
|
||||||
|
<field x="89.5" y="27" type="Testo" width="2.5" id="209" pattern="1" text="C.I.">
|
||||||
|
<font face="Arial" bold="1" size="8" />
|
||||||
|
</field>
|
||||||
|
<field border="1" x="15.5" y="26.5" type="Linea" height="23.5" id="500" pattern="1" />
|
||||||
|
<field border="1" x="52.5" y="26.5" type="Linea" height="23.5" id="500" pattern="1" />
|
||||||
|
<field border="1" x="57" y="26.5" type="Linea" height="23.5" id="500" pattern="1" />
|
||||||
|
<field border="1" x="65.16" y="26.5" type="Linea" height="23.5" id="500" pattern="1" />
|
||||||
|
<field border="1" x="77.25" y="26.5" type="Linea" height="23.5" id="500" pattern="1" />
|
||||||
|
<field border="1" x="88.75" y="26.5" type="Linea" height="23.5" id="500" pattern="1" />
|
||||||
|
</section>
|
||||||
|
<section type="Body" level="1" pattern="1">
|
||||||
|
<condition>34.TIPORIGA='01'</condition>
|
||||||
|
<font face="Arial" size="10" />
|
||||||
|
<field x="16" type="Stringa" bg_color="#D4D4D4" dynamic_height="1" width="36" height="22" id="52" pattern="1">
|
||||||
|
<prescript description="B1.52 PRESCRIPT">MESSAGE _DESCRIGA</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="53" type="Stringa" bg_color="#C0C0C0" width="3" id="53" pattern="1">
|
||||||
|
<source>34.UMQTA</source>
|
||||||
|
<prescript description="B1.53 PRESCRIPT">MESSAGE _ALIGN,#52,BOTTOM</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="57" type="Numero" align="right" bg_color="#00FFFF" width="7.5" id="54" pattern="1" hide_zero="1" text="###.###">
|
||||||
|
<groups>30</groups>
|
||||||
|
<source>34.QTA</source>
|
||||||
|
<prescript description="B1.54 PRESCRIPT">MESSAGE _ALIGN,#52,BOTTOM</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="65" type="Prezzo" align="right" bg_color="#FF80C0" width="10.5" codval="33.CODVAL" id="55" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<groups>29</groups>
|
||||||
|
<source>34.PREZZO</source>
|
||||||
|
<prescript description="B1.55 PRESCRIPT">MESSAGE _ALIGN,#52,BOTTOM</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="76.5" type="Prezzo" align="right" bg_color="#00FFFF" width="12" codval="33.CODVAL" id="57" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<groups>29</groups>
|
||||||
|
<source>34.IMPNS</source>
|
||||||
|
<prescript description="B1.57 PRESCRIPT">MESSAGE _ALIGN,#52,BOTTOM</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="89.75" type="Stringa" bg_color="#EFEFEF" width="3" id="58" pattern="1">
|
||||||
|
<source>34.CODIVA</source>
|
||||||
|
<prescript description="B1.58 PRESCRIPT">MESSAGE _ALIGN,#52,BOTTOM</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="94.5" type="Prezzo" hidden="1" align="right" bg_color="#E1E1E1" width="15" codval="33.CODVAL" id="59" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<groups>29</groups>
|
||||||
|
<source>34.PREZZONS</source>
|
||||||
|
<prescript description="B1.59 PRESCRIPT">MESSAGE _ALIGN,#52,BOTTOM</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="109.5" type="Valuta" hidden="1" align="right" width="15" codval="33.CODVAL" id="60" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<groups>31</groups>
|
||||||
|
<source>34.PROVVR</source>
|
||||||
|
<prescript description="B1.60 PRESCRIPT">MESSAGE _ALIGN,#52,BOTTOM</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="124.5" type="Valuta" hidden="1" align="right" width="15" codval="33.CODVAL" id="61" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<groups>31</groups>
|
||||||
|
<source>34.IMPOSTA</source>
|
||||||
|
<prescript description="B1.61 PRESCRIPT">MESSAGE _ALIGN,#52,BOTTOM</prescript>
|
||||||
|
</field>
|
||||||
|
</section>
|
||||||
|
<section type="Body" level="2" pattern="1">
|
||||||
|
<condition>34.TIPORIGA='05'</condition>
|
||||||
|
<field x="2" type="Stringa" bg_color="#FFFF80" width="13" id="51" pattern="2">
|
||||||
|
<source>34.CODART</source>
|
||||||
|
<prescript description="B2.51 PRESCRIPT">MON
|
||||||
|
1
|
||||||
|
"34.PRIORITY" @
|
||||||
|
+
|
||||||
|
2 *
|
||||||
|
0
|
||||||
|
#THIS_FIELD SET_POS</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="16" type="Stringa" bg_color="#00FF80" dynamic_height="1" width="36" height="22" id="52" pattern="2">
|
||||||
|
<prescript description="B2.52 PRESCRIPT">MESSAGE _DESCRIGA</prescript>
|
||||||
|
</field>
|
||||||
|
</section>
|
||||||
|
<section y="50" hidden_if_needed="1" type="Foot" pattern="1" />
|
||||||
|
<section y="50" type="Foot" level="1" pattern="1">
|
||||||
|
<font face="Arial" size="9" />
|
||||||
|
<field x="1" y="7" type="Stringa" width="80" height="2" pattern="1">
|
||||||
|
<font face="Arial" size="8" />
|
||||||
|
<prescript description="F1.0 PRESCRIPT">#DOC.LIQDIFF @
|
||||||
|
EMPTY=
|
||||||
|
NEGATE
|
||||||
|
#CLI.ALLEG @
|
||||||
|
7
|
||||||
|
C;
|
||||||
|
AND
|
||||||
|
IF
|
||||||
|
"IVA a esigibilit&#E0; differita ai sensi dell'art. 6 comma 5, del dpr n.633F;2973 e dell' art.7 legge 2F;2009"
|
||||||
|
#THIS !
|
||||||
|
THEN</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="45" y="12.5" type="Stringa" width="40" height="2" pattern="1">
|
||||||
|
<font face="Arial" size="8" />
|
||||||
|
<prescript description="F1.0 PRESCRIPT">#DOC.LIQDIFF @
|
||||||
|
EMPTY=
|
||||||
|
NEGATE
|
||||||
|
#CLI.ALLEG @
|
||||||
|
7
|
||||||
|
C;
|
||||||
|
AND
|
||||||
|
IF
|
||||||
|
"IVA a esigibilit&#E0; differita ai sensi dell'art. 6 comma 5, del dpr n.633F;2973 e dell' art.7 legge 2F;2009"
|
||||||
|
#THIS !
|
||||||
|
THEN</prescript>
|
||||||
|
</field>
|
||||||
|
<field y="2" type="Valuta" align="right" bg_color="#00FFFF" width="12" codval="33.CODVAL" id="101" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<groups>31</groups>
|
||||||
|
<source>TOTMER</source>
|
||||||
|
</field>
|
||||||
|
<field x="14" y="2" type="Stringa" bg_color="#0000FF" width="5" id="102" pattern="1">
|
||||||
|
<source>33.SCONTOPERC</source>
|
||||||
|
</field>
|
||||||
|
<field x="16" type="Valuta" hidden="1" align="right" width="10" codval="33.CODVAL" id="103" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<groups>31</groups>
|
||||||
|
<source>SCONTOT</source>
|
||||||
|
</field>
|
||||||
|
<field x="44" y="2" type="Valuta" align="right" bg_color="#FFFF00" width="10" codval="33.CODVAL" id="104" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<groups>31</groups>
|
||||||
|
<source>SPESTRA</source>
|
||||||
|
</field>
|
||||||
|
<field x="32.5" y="2" type="Valuta" align="right" bg_color="#7F007F" width="9.5" codval="33.CODVAL" id="105" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<groups>31</groups>
|
||||||
|
<source>SPESIMB</source>
|
||||||
|
</field>
|
||||||
|
<field x="76.5" y="7" type="Valuta" align="right" width="15" codval="33.CODVAL" id="106" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<groups>31</groups>
|
||||||
|
<source>33.IMPPAGATO</source>
|
||||||
|
</field>
|
||||||
|
<field x="1" y="4" type="Stringa" bg_color="#7F7F7F" width="4" id="107" pattern="1">
|
||||||
|
<prescript description="F1.107 PRESCRIPT">MESSAGE _RIEPILOGOIVA,1,COD,0</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="20" y="4" type="Valuta" align="right" bg_color="#FF00FF" width="14" codval="33.CODVAL" id="108" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<groups>31</groups>
|
||||||
|
<prescript description="F1.108 PRESCRIPT">MESSAGE _RIEPILOGOIVA,1,IMP,0</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="35" y="4" type="Numero" align="right" width="4" id="109" pattern="1" hide_zero="1" text="##">
|
||||||
|
<prescript description="F1.109 PRESCRIPT">MESSAGE _RIEPILOGOIVA,1,ALI,0</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="41" y="4" type="Valuta" align="right" width="10" codval="33.CODVAL" id="110" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<groups>31</groups>
|
||||||
|
<prescript description="F1.110 PRESCRIPT">MESSAGE _RIEPILOGOIVA,1,IVA,1</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="1" y="5" type="Stringa" width="4" id="111" pattern="1">
|
||||||
|
<prescript description="F1.111 PRESCRIPT">MESSAGE _RIEPILOGOIVA,1,COD,0</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="20" y="5" type="Valuta" align="right" width="14" codval="33.CODVAL" id="112" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<groups>31</groups>
|
||||||
|
<prescript description="F1.112 PRESCRIPT">MESSAGE _RIEPILOGOIVA,1,IMP,0</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="35" y="5" type="Numero" align="right" width="4" id="113" pattern="1" hide_zero="1" text="##">
|
||||||
|
<prescript description="F1.113 PRESCRIPT">MESSAGE _RIEPILOGOIVA,1,ALI,0</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="41" y="5" type="Valuta" align="right" width="10" codval="33.CODVAL" id="114" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<groups>31</groups>
|
||||||
|
<prescript description="F1.114 PRESCRIPT">MESSAGE _RIEPILOGOIVA,1,IVA,1</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="1" y="6" type="Stringa" width="4" id="115" pattern="1">
|
||||||
|
<prescript description="F1.115 PRESCRIPT">MESSAGE _RIEPILOGOIVA,1,COD,0</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="20" y="6" type="Valuta" align="right" bg_color="#FF00FF" width="14" codval="33.CODVAL" id="116" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<groups>31</groups>
|
||||||
|
<prescript description="F1.116 PRESCRIPT">MESSAGE _RIEPILOGOIVA,1,IMP,0</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="35" y="6" type="Numero" align="right" width="4" id="117" pattern="1" hide_zero="1" text="##">
|
||||||
|
<prescript description="F1.117 PRESCRIPT">MESSAGE _RIEPILOGOIVA,1,ALI,0</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="41" y="6" type="Valuta" align="right" bg_color="#00FFFF" width="10" codval="33.CODVAL" id="118" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<groups>31</groups>
|
||||||
|
<prescript description="F1.118 PRESCRIPT">MESSAGE _RIEPILOGOIVA,1,IVA,1</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="20" y="7" type="Valuta" align="right" bg_color="#FF00FF" width="14" codval="33.CODVAL" id="119" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<groups>31</groups>
|
||||||
|
<prescript description="F1.119 PRESCRIPT">MESSAGE _RIEPILOGOIVA,30,IMP,0</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="1" y="7" type="Stringa" width="4" id="120" pattern="1">
|
||||||
|
<prescript description="F1.120 PRESCRIPT">MESSAGE _RIEPILOGOIVA,30,COD,0</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="41" y="7" type="Stringa" width="29" id="121" pattern="1">
|
||||||
|
<prescript description="F1.121 PRESCRIPT">MESSAGE _RIEPILOGOIVA,30,DES,1</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="20" y="8" type="Valuta" align="right" bg_color="#0000FF" width="14" codval="33.CODVAL" id="122" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<groups>31</groups>
|
||||||
|
<prescript description="F1.122 PRESCRIPT">MESSAGE _RIEPILOGOIVA,30,IMP,0</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="1" y="8" type="Stringa" bg_color="#00FFFF" width="4" id="123" pattern="1">
|
||||||
|
<prescript description="F1.123 PRESCRIPT">MESSAGE _RIEPILOGOIVA,30,COD,0</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="41" y="8" type="Stringa" bg_color="#00FFFF" width="29" id="124" pattern="1">
|
||||||
|
<prescript description="F1.124 PRESCRIPT">MESSAGE _RIEPILOGOIVA,30,DES,1</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="60.5" y="2" type="Valuta" align="right" bg_color="#FF0000" width="13.5" codval="33.CODVAL" id="125" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<groups>31</groups>
|
||||||
|
<source>IMPONIBILI</source>
|
||||||
|
</field>
|
||||||
|
<field x="78.5" y="2" type="Valuta" align="right" bg_color="#007F7F" width="13" codval="33.CODVAL" id="126" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<groups>31</groups>
|
||||||
|
<source>IMPOSTE</source>
|
||||||
|
</field>
|
||||||
|
<field x="36" deactivated="1" type="Valuta" hidden="1" align="right" width="11" codval="33.CODVAL" id="127" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<groups>31</groups>
|
||||||
|
<prescript description="F1.127 PRESCRIPT">MESSAGE _TOTIMPONIBILI,28</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="59" type="Valuta" hidden="1" align="right" width="10" codval="33.CODVAL" id="128" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<groups>31</groups>
|
||||||
|
<source>SPESINC</source>
|
||||||
|
</field>
|
||||||
|
<field x="48" type="Valuta" hidden="1" align="right" width="10" codval="33.CODVAL" id="129" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<groups>31</groups>
|
||||||
|
<source>BOLLI</source>
|
||||||
|
</field>
|
||||||
|
<field x="76.5" y="10.25" type="Valuta" align="right" width="15" codval="33.CODVAL" height="1.25" id="130" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<font face="Arial" bold="1" size="10" />
|
||||||
|
<groups>31</groups>
|
||||||
|
<source>TOTDOC</source>
|
||||||
|
</field>
|
||||||
|
<field x="45" y="13" deactivated="1" type="Valuta" align="right" width="11" codval="33.CODVAL" id="137" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<groups>31</groups>
|
||||||
|
<source>33.IMPPAGATO</source>
|
||||||
|
<prescript description="F1.137 PRESCRIPT">MESSAGE SUB,138</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="69" y="13" deactivated="1" type="Valuta" align="right" width="11" codval="33.CODVAL" id="138" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<groups>31</groups>
|
||||||
|
</field>
|
||||||
|
<field x="1" y="10" type="Data" bg_color="#7F7F7F" width="8" id="143" pattern="1">
|
||||||
|
<prescript description="F1.143 PRESCRIPT">MESSAGE _SCADENZE,DATA,0</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="10" y="10" type="Valuta" align="right" width="11" codval="33.CODVAL" id="144" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<groups>31</groups>
|
||||||
|
<prescript description="F1.144 PRESCRIPT">MESSAGE _SCADENZE,IMPORTO,1</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="24" y="10" type="Data" width="8" id="145" pattern="1">
|
||||||
|
<prescript description="F1.145 PRESCRIPT">MESSAGE _SCADENZE,DATA,0</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="33" y="10" type="Valuta" align="right" width="11" codval="33.CODVAL" id="146" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<groups>31</groups>
|
||||||
|
<prescript description="F1.146 PRESCRIPT">MESSAGE _SCADENZE,IMPORTO,1</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="46.5" y="10" type="Data" width="8" id="147" pattern="1">
|
||||||
|
<prescript description="F1.147 PRESCRIPT">MESSAGE _SCADENZE,DATA,0</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="55.5" y="10" type="Valuta" align="right" width="11" codval="33.CODVAL" id="148" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<groups>31</groups>
|
||||||
|
<prescript description="F1.148 PRESCRIPT">MESSAGE _SCADENZE,IMPORTO,1</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="1" y="11" type="Data" width="8" id="149" pattern="1">
|
||||||
|
<prescript description="F1.149 PRESCRIPT">MESSAGE _SCADENZE,DATA,0</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="10" y="11" type="Valuta" align="right" bg_color="#00FFFF" width="11" codval="33.CODVAL" id="150" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<groups>31</groups>
|
||||||
|
<prescript description="F1.150 PRESCRIPT">MESSAGE _SCADENZE,IMPORTO,1</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="24" y="11" type="Data" width="8" id="151" pattern="1">
|
||||||
|
<prescript description="F1.151 PRESCRIPT">MESSAGE _SCADENZE,DATA,0</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="33" y="11" type="Valuta" align="right" width="11" codval="33.CODVAL" id="152" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
<groups>31</groups>
|
||||||
|
<prescript description="F1.152 PRESCRIPT">MESSAGE _SCADENZE,IMPORTO,1</prescript>
|
||||||
|
</field>
|
||||||
|
</section>
|
||||||
|
<sql>USE 33
|
||||||
|
JOIN 34 INTO CODNUM==CODNUM ANNO==ANNO PROVV==PROVV NDOC==NDOC
|
||||||
|
JOIN 17 TO 33 INTO TIPOCF==TIPOCF CODCF==CODCF
|
||||||
|
JOIN 20 TO 33 INTO TIPOCF==TIPOCF CODCF==CODCF
|
||||||
|
JOIN 16 TO 33 INTO TIPOCF==TIPOCF CODCF==CODCF CODIND==CODINDSP
|
||||||
|
JOIN 16 TO 17 ALIAS 116 INTO TIPOCF==TIPOCF CODCF==CODCF CODIND==CODINDSP
|
||||||
|
JOIN 47 TO 34 INTO CODART==CODART
|
||||||
|
JOIN %CPG TO 33 ALIAS 201 INTO CODTAB==CODPAG
|
||||||
|
JOIN 122 TO 33 INTO CODAGE==CODAG
|
||||||
|
JOIN %POR TO 33 ALIAS 203 INTO CODTAB==CODPORTO
|
||||||
|
JOIN %BAN TO 33 ALIAS 204 INTO CODTAB==CODABIA+CODCABA
|
||||||
|
JOIN %VET TO 33 ALIAS 205 INTO CODTAB==CODVETT1
|
||||||
|
JOIN %ASP TO 33 ALIAS 206 INTO CODTAB==ASPBENI1
|
||||||
|
JOIN %CTR TO 33 ALIAS 207 INTO CODTAB==CAUSTRASP
|
||||||
|
JOIN %BAN TO 33 ALIAS 208 INTO CODTAB==CODABIA
|
||||||
|
JOIN %VAL TO 33 ALIAS 209 INTO CODTAB==CODVAL
|
||||||
|
JOIN %TIP TO 33 ALIAS 210 INTO CODTAB==TIPODOC
|
||||||
|
JOIN %MSP TO 33 ALIAS 211 INTO CODTAB==CODSPMEZZO
|
||||||
|
JOIN CMS TO 33 ALIAS 212 INTO CODTAB==CODCMS
|
||||||
|
JOIN BNP TO 33 ALIAS 213 INTO CODTAB==CODABIP+CODCABP+PROGBNP</sql>
|
||||||
|
</report>
|
143
pe/pe1400a.uml
Normal file
143
pe/pe1400a.uml
Normal file
@ -0,0 +1,143 @@
|
|||||||
|
#include "pe1400.h"
|
||||||
|
|
||||||
|
TOOLBAR "topbar" 0 0 0 2
|
||||||
|
#include <relapbar.h>
|
||||||
|
ENDPAGE
|
||||||
|
|
||||||
|
PAGE "Preventivi" 0 0 0 0
|
||||||
|
|
||||||
|
GROUPBOX DLG_NULL 78 6
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 0 "@bPreventivo"
|
||||||
|
END
|
||||||
|
|
||||||
|
LIST F_PROVV 1 12
|
||||||
|
BEGIN
|
||||||
|
PROMPT 69 69 ""
|
||||||
|
ITEM "D|Definitivi"
|
||||||
|
ITEM "P|Provvisori"
|
||||||
|
FIELD PROVV
|
||||||
|
FLAGS "D"
|
||||||
|
KEY 1
|
||||||
|
END
|
||||||
|
|
||||||
|
NUMBER F_ANNO 4
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 1 "Anno "
|
||||||
|
FLAGS "AU"
|
||||||
|
CHECKTYPE REQUIRED
|
||||||
|
KEY 1
|
||||||
|
FIELD ANNO
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_CODNUM 4
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 2 "Numerazione "
|
||||||
|
USE %NUM SELECT I0>0
|
||||||
|
FLAGS "UP"
|
||||||
|
INPUT CODTAB F_CODNUM
|
||||||
|
DISPLAY "Codice" CODTAB
|
||||||
|
DISPLAY "Descrizione@50" S0
|
||||||
|
OUTPUT F_CODNUM CODTAB
|
||||||
|
OUTPUT F_DESNUM S0
|
||||||
|
CHECKTYPE REQUIRED
|
||||||
|
FIELD CODNUM
|
||||||
|
KEY 1
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_DESNUM 50
|
||||||
|
BEGIN
|
||||||
|
PROMPT 24 2 ""
|
||||||
|
USE %NUM KEY 2 SELECT I0>0
|
||||||
|
INPUT S0 F_DESNUM
|
||||||
|
DISPLAY "Descrizione@50" S0
|
||||||
|
DISPLAY "Codice Num." CODTAB
|
||||||
|
COPY OUTPUT F_CODNUM
|
||||||
|
CHECKTYPE REQUIRED
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_TIPODOC 4
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 3 "Tipo "
|
||||||
|
FLAGS "DG"
|
||||||
|
FIELD TIPODOC
|
||||||
|
USE %TIP
|
||||||
|
INPUT CODTAB F_TIPODOC
|
||||||
|
OUTPUT F_DESTIPO S0
|
||||||
|
CHEKCTYPE NORMAL
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_DESTIPO 50
|
||||||
|
BEGIN
|
||||||
|
PROMPT 24 3 ""
|
||||||
|
FLAGS "D"
|
||||||
|
END
|
||||||
|
|
||||||
|
NUMBER F_NDOC 7
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 4 "Numero "
|
||||||
|
USE LF_DOC
|
||||||
|
JOIN LF_CLIFO INTO TIPOCF=TIPOCF CODCF==CODCF
|
||||||
|
INPUT PROVV "D"
|
||||||
|
INPUT ANNO F_ANNO SELECT
|
||||||
|
INPUT CODNUM F_CODNUM SELECT
|
||||||
|
INPUT NDOC F_NDOC
|
||||||
|
DISPLAY "Anno" ANNO
|
||||||
|
DISPLAY "Numerazione" CODNUM
|
||||||
|
DISPLAY "Numero" NDOC
|
||||||
|
DISPLAY "Stato" STATO
|
||||||
|
DISPLAY "Cliente" CODCF
|
||||||
|
DISPLAY "Ragione Sociale@50" LF_CLIFO->RAGSOC
|
||||||
|
OUTPUT F_NDOC NDOC
|
||||||
|
CHECKTYPE REQUIRED
|
||||||
|
FIELD NDOC
|
||||||
|
KEY 1
|
||||||
|
END
|
||||||
|
|
||||||
|
NUMBER F_NPREV 7
|
||||||
|
BEGIN
|
||||||
|
PROMPT 42 4 "Preventivo "
|
||||||
|
FLAGS "D"
|
||||||
|
END
|
||||||
|
|
||||||
|
NUMBER F_NREV 3
|
||||||
|
BEGIN
|
||||||
|
PROMPT 61 4 "Revisione "
|
||||||
|
FLAGS "DZ"
|
||||||
|
END
|
||||||
|
|
||||||
|
NUMBER F_CLIFO 6
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 6 "Cliente "
|
||||||
|
USE LF_DOC KEY 4 SELECT (CODNUM=#F_CODNUM)&&(BETWEEN(ANNO,#F_ANNO,#F_ANNO))
|
||||||
|
JOIN LF_CLIFO INTO TIPOCF=TIPOCF CODCF==CODCF
|
||||||
|
INPUT TIPOCF "C"
|
||||||
|
INPUT CODCF F_CLIFO
|
||||||
|
INPUT ANNO F_ANNO
|
||||||
|
DISPLAY "Cliente" CODCF
|
||||||
|
DISPLAY "Ragione Sociale@50" LF_CLIFO->RAGSOC
|
||||||
|
DISPLAY "Anno" LF_DOC->ANNO
|
||||||
|
DISPLAY "Numerazione" LF_DOC->CODNUM
|
||||||
|
DISPLAY "Numero" LF_DOC->NDOC
|
||||||
|
DISPLAY "Stato" LF_DOC->STATO
|
||||||
|
OUTPUT F_CLIFO LF_CLIFO->CODCF
|
||||||
|
OUTPUT F_RAGSOC LF_CLIFO->RAGSOC
|
||||||
|
OUTPUT F_NDOC LF_DOC->NDOC
|
||||||
|
CHECKTYPE NORMAL
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_RAGSOC 50
|
||||||
|
BEGIN
|
||||||
|
PROMPT 24 6 ""
|
||||||
|
USE LF_CLIFO KEY 2 SELECT (LF_DOC->NDOC!="")&&(LF_DOC->CODNUM=#F_CODNUM)
|
||||||
|
JOIN LF_DOC KEY 4 INTO TIPOCF=TIPOCF CODCF==CODCF PROVV=#F_PROVV ANNO=#F_ANNO CODNUM=#F_CODNUM
|
||||||
|
INPUT TIPOCF "C"
|
||||||
|
INPUT RAGSOC F_RAGSOC
|
||||||
|
COPY DISPLAY F_CLIFO
|
||||||
|
COPY OUTPUT F_CLIFO
|
||||||
|
CHECKTYPE NORMAL
|
||||||
|
END
|
||||||
|
|
||||||
|
ENDPAGE
|
||||||
|
|
||||||
|
ENDMASK
|
709
pe/pe1400b.uml
Normal file
709
pe/pe1400b.uml
Normal file
@ -0,0 +1,709 @@
|
|||||||
|
#include "pe1400.h"
|
||||||
|
|
||||||
|
TOOLBAR "topbar" 0 0 0 2
|
||||||
|
|
||||||
|
BUTTON DLG_NEWREC 2 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 1 "~Nuovo"
|
||||||
|
MESSAGE EXIT,K_INS
|
||||||
|
PICTURE TOOL_NEWREC
|
||||||
|
END
|
||||||
|
|
||||||
|
BUTTON DLG_COPY 2 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 1 "Duplica"
|
||||||
|
PICTURE TOOL_COPY
|
||||||
|
END
|
||||||
|
|
||||||
|
BUTTON DLG_SAVEREC 2 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 1 "~Registra"
|
||||||
|
MESSAGE EXIT,K_SAVE
|
||||||
|
PICTURE TOOL_SAVEREC
|
||||||
|
END
|
||||||
|
|
||||||
|
BUTTON DLG_DELREC 2 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT 3 1 "~Elimina"
|
||||||
|
MESSAGE EXIT,K_DEL
|
||||||
|
PICTURE TOOL_DELREC
|
||||||
|
END
|
||||||
|
|
||||||
|
BUTTON DLG_NULL 2 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT -1 1 ""
|
||||||
|
PICTURE 0
|
||||||
|
END
|
||||||
|
|
||||||
|
BUTTON DLG_ELABORA 2 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 2 "Elabora"
|
||||||
|
PICTURE TOOL_ELABORA
|
||||||
|
END
|
||||||
|
|
||||||
|
BUTTON DLG_PRINT 2 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 3 "Stampa"
|
||||||
|
PICTURE TOOL_PRINT
|
||||||
|
END
|
||||||
|
|
||||||
|
BUTTON DLG_PREVIEW 2 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 3 "Antepr."
|
||||||
|
PICTURE TOOL_PREVIEW
|
||||||
|
END
|
||||||
|
|
||||||
|
BUTTON DLG_NULL 2 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT -1 1 ""
|
||||||
|
PICTURE 0
|
||||||
|
END
|
||||||
|
|
||||||
|
#include <navbar.h>
|
||||||
|
#include <cancelbar.h>
|
||||||
|
|
||||||
|
ENDPAGE
|
||||||
|
|
||||||
|
PAGE "Preventivi" 0 0 0 0
|
||||||
|
|
||||||
|
GROUPBOX DLG_NULL 78 6
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 0 "@bPreventivo"
|
||||||
|
END
|
||||||
|
|
||||||
|
LIST F_PROVV 1 12
|
||||||
|
BEGIN
|
||||||
|
PROMPT 69 69 ""
|
||||||
|
ITEM "D|Definitivi"
|
||||||
|
ITEM "P|Provvisori"
|
||||||
|
FIELD PROVV
|
||||||
|
FLAGS "D"
|
||||||
|
KEY 1
|
||||||
|
END
|
||||||
|
|
||||||
|
NUMBER F_ANNO 4
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 1 "Anno "
|
||||||
|
FLAGS "D"
|
||||||
|
CHECKTYPE REQUIRED
|
||||||
|
FIELD ANNO
|
||||||
|
KEY 1
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_CODNUM 4
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 2 "Numerazione "
|
||||||
|
USE %NUM
|
||||||
|
FLAGS "DGU"
|
||||||
|
INPUT CODTAB F_CODNUM
|
||||||
|
OUTPUT F_DESNUM S0
|
||||||
|
CHECKTYPE REQUIRED
|
||||||
|
FIELD CODNUM
|
||||||
|
KEY 1
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_DESNUM 50
|
||||||
|
BEGIN
|
||||||
|
PROMPT 24 2 ""
|
||||||
|
FLAGS "D"
|
||||||
|
END
|
||||||
|
|
||||||
|
NUMBER F_NDOC 7
|
||||||
|
BEGIN
|
||||||
|
PROMPT 24 1 "Numero documento "
|
||||||
|
FLAGS "DG"
|
||||||
|
CHECKTYPE REQUIRED
|
||||||
|
FIELD NDOC
|
||||||
|
KEY 1
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_STATO 1
|
||||||
|
BEGIN
|
||||||
|
PROMPT 53 1 "Stato "
|
||||||
|
FIELD STATO
|
||||||
|
FLAGS "DG"
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_TIPODOC 4
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 3 "Tipo "
|
||||||
|
FLAGS "H"
|
||||||
|
FIELD TIPODOC
|
||||||
|
USE %TIP
|
||||||
|
INPUT CODTAB F_TIPODOC
|
||||||
|
OUTPUT F_DESTIPO S0
|
||||||
|
CHEKCTYPE NORMAL
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_DESTIPO 50
|
||||||
|
BEGIN
|
||||||
|
PROMPT 24 3 ""
|
||||||
|
FLAGS "H"
|
||||||
|
END
|
||||||
|
|
||||||
|
NUMBER F_NPREV 7
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 3 "Preventivo "
|
||||||
|
FLAGS "D"
|
||||||
|
END
|
||||||
|
|
||||||
|
NUMBER F_NREV 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT 24 3 "Revisione "
|
||||||
|
FLAGS "DZ"
|
||||||
|
END
|
||||||
|
|
||||||
|
DATE F_DATADOC
|
||||||
|
BEGIN
|
||||||
|
PROMPT 46 3 "Data "
|
||||||
|
FLAGS "A"
|
||||||
|
FIELD DATADOC
|
||||||
|
CHECKTYPE REQUIRED
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_NUMDOCRIF 7
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 4 "Documento di riferimento "
|
||||||
|
FIELD NUMDOCRIF
|
||||||
|
END
|
||||||
|
|
||||||
|
DATE F_DATADOCRIF
|
||||||
|
BEGIN
|
||||||
|
PROMPT 36 4 "del "
|
||||||
|
FIELD DATADOCRIF
|
||||||
|
END
|
||||||
|
|
||||||
|
GOLEM F_OGGETTI 10 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT 64 3 ""
|
||||||
|
FIELD COLL_GOLEM
|
||||||
|
FLAGS "M"
|
||||||
|
END
|
||||||
|
|
||||||
|
GROUPBOX DLG_NULL 78 9
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 6 "@bCliente"
|
||||||
|
END
|
||||||
|
|
||||||
|
LIST DLG_NULL 1 7
|
||||||
|
BEGIN
|
||||||
|
PROMPT 68 68 "Tipo "
|
||||||
|
ITEM "C|Cliente"
|
||||||
|
FLAGS "H"
|
||||||
|
FIELD TIPOCF
|
||||||
|
END
|
||||||
|
|
||||||
|
NUMBER F_CLIFO 7
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 7 "Cliente "
|
||||||
|
USE LF_CLIFO
|
||||||
|
INPUT TIPOCF "C"
|
||||||
|
INPUT CODCF F_CLIFO
|
||||||
|
DISPLAY "Cliente" CODCF
|
||||||
|
DISPLAY "Ragione Sociale@50" LF_CLIFO->RAGSOC
|
||||||
|
DISPLAY "Partita IVA@12" PAIV
|
||||||
|
DISPLAY "Codice Fiscale@16" COFI
|
||||||
|
DISPLAY "Sospeso@C" SOSPESO
|
||||||
|
OUTPUT F_CLIFO CODCF
|
||||||
|
OUTPUT F_RAGSOC RAGSOC
|
||||||
|
OUTPUT F_RICALT RICALT
|
||||||
|
OUTPUT F_STATOPAIV STATOPAIV
|
||||||
|
OUTPUT F_PAIV PAIV
|
||||||
|
OUTPUT F_COFI COFI
|
||||||
|
CHECKTYPE REQUIRED
|
||||||
|
FIELD CODCF
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_RAGSOC 50
|
||||||
|
BEGIN
|
||||||
|
PROMPT 24 7 ""
|
||||||
|
USE LF_CLIFO KEY 2
|
||||||
|
INPUT TIPOCF "C"
|
||||||
|
INPUT RAGSOC F_RAGSOC
|
||||||
|
DISPLAY "Ragione Sociale@50" RAGSOC
|
||||||
|
DISPLAY "Cliente" CODCF
|
||||||
|
DISPLAY "Partita IVA@12" PAIV
|
||||||
|
DISPLAY "Codice Fiscale@16" COFI
|
||||||
|
DISPLAY "Sospeso@C" SOSPESO
|
||||||
|
COPY OUTPUT F_CLIFO
|
||||||
|
CHECKTYPE REQUIRED
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_RICALT 30
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 8 "Codice "
|
||||||
|
USE LF_CLIFO KEY 6
|
||||||
|
INPUT TIPOCF "C"
|
||||||
|
INPUT RICALT F_RICALT
|
||||||
|
DISPLAY "Codice alt.@30" RICALT
|
||||||
|
DISPLAY "Cliente" CODCF
|
||||||
|
DISPLAY "Ragione sociale@50" RAGSOC
|
||||||
|
DISPLAY "Sospeso@C" SOSPESO
|
||||||
|
COPY OUTPUT F_CLIFO
|
||||||
|
HELP "Chiave di ricerca alternativa"
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_STATOPAIV 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT 52 8 "Stato CEE "
|
||||||
|
HELP "Codice ISO dello stato"
|
||||||
|
FLAGS "U"
|
||||||
|
USE %SCE
|
||||||
|
INPUT CODTAB F_STATOPAIV
|
||||||
|
DISPLAY "Codice" CODTAB
|
||||||
|
DISPLAY "Descrizione@50" S0
|
||||||
|
OUTPUT F_STATOPAIV CODTAB
|
||||||
|
CHECKTYPE NORMAL
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_COFI 16
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 9 "Codice fiscale "
|
||||||
|
FLAGS "U"
|
||||||
|
USE LF_CLIFO KEY 4
|
||||||
|
INPUT TIPOCF "C"
|
||||||
|
INPUT COFI F_COFI
|
||||||
|
DISPLAY "Codice fiscale@16" COFI
|
||||||
|
DISPLAY "Cliente" CODCF
|
||||||
|
DISPLAY "Ragione sociale@50" RAGSOC
|
||||||
|
DISPLAY "Partita IVA@12" PAIV
|
||||||
|
DISPLAY "Sospeso@C" SOSPESO
|
||||||
|
COPY OUTPUT F_CLIFO
|
||||||
|
HELP "Codice fiscale del cliente/fornitore"
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_PAIV 12
|
||||||
|
BEGIN
|
||||||
|
PROMPT 50 9 "Partita IVA "
|
||||||
|
KEY 5
|
||||||
|
USE LF_CLIFO KEY 5
|
||||||
|
INPUT TIPOCF "C"
|
||||||
|
INPUT STATOPAIV F_STATOPAIV
|
||||||
|
INPUT PAIV F_PAIV
|
||||||
|
DISPLAY "Partita IVA@11" PAIV
|
||||||
|
DISPLAY "Cliente" CODCF
|
||||||
|
DISPLAY "Ragione sociale@50" RAGSOC
|
||||||
|
DISPLAY "Codice fiscale@16" COFI
|
||||||
|
DISPLAY "Sospeso@C" SOSPESO
|
||||||
|
COPY OUTPUT F_CLIFO
|
||||||
|
HELP "Partita IVA del cliente/fornitore"
|
||||||
|
VALIDATE PI_FUNC F_STATOPAIV
|
||||||
|
END
|
||||||
|
|
||||||
|
ZOOM F_NOTE 62
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 10 "Note "
|
||||||
|
FIELD NOTE
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_CODPAG 4
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 11 "Pagamento "
|
||||||
|
USE %CPG
|
||||||
|
INPUT CODTAB F_CODPAG
|
||||||
|
DISPLAY "Codice" CODTAB
|
||||||
|
DISPLAY "Descrizione@50" S0
|
||||||
|
OUTPUT F_CODPAG CODTAB
|
||||||
|
OUTPUT F_DESPAG S0
|
||||||
|
CHECKTYPE NORMAL
|
||||||
|
FIELD CODPAG
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_DESPAG 50
|
||||||
|
BEGIN
|
||||||
|
PROMPT 24 11 ""
|
||||||
|
USE %CPG KEY 2
|
||||||
|
INPUT S0 F_DESPAG
|
||||||
|
DISPLAY "Descrizione@50" S0
|
||||||
|
DISPLAY "Codice" CODTAB
|
||||||
|
COPY OUTPUT F_CODPAG
|
||||||
|
CHECKTYPE NORMAL
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_CODLIS 4
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 12 "Listino "
|
||||||
|
FLAGS "U"
|
||||||
|
USE LF_CONDV
|
||||||
|
INPUT TIPO "L"
|
||||||
|
INPUT CATVEN ""
|
||||||
|
INPUT COD F_CODLIS
|
||||||
|
DISPLAY "Codice" COD
|
||||||
|
DISPLAY "Descrizione@50" DESCR
|
||||||
|
DISPLAY "Inizio@10" VALIN
|
||||||
|
DISPLAY "Fine@10" VALFIN
|
||||||
|
OUTPUT F_CODLIS COD
|
||||||
|
OUTPUT F_DESLIS DESCR
|
||||||
|
ADD RUN ve2 -1 L
|
||||||
|
CHECKTYPE NORMAL
|
||||||
|
FIELD CODLIST
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_DESLIS 50
|
||||||
|
BEGIN
|
||||||
|
PROMPT 24 12 ""
|
||||||
|
USE LF_CONDV KEY 2
|
||||||
|
INPUT TIPO "L"
|
||||||
|
INPUT CATVEN ""
|
||||||
|
INPUT DESCR F_DESLIS
|
||||||
|
DISPLAY "Descrizione@50" DESCR
|
||||||
|
DISPLAY "Codice" COD
|
||||||
|
DISPLAY "Inizio@10" VALIN
|
||||||
|
DISPLAY "Fine@10" VALFIN
|
||||||
|
COPY OUTPUT F_CODLIS
|
||||||
|
CHECKTYPE NORMAL
|
||||||
|
ADD RUN ve2 -1 L
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_RICARICO 25
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 13 "Ricarico "
|
||||||
|
FIELD SCONTOPERC
|
||||||
|
END
|
||||||
|
|
||||||
|
LIST F_TIPOCOSTO 1 25
|
||||||
|
BEGIN
|
||||||
|
PROMPT 43 13 "Costo "
|
||||||
|
ITEM "0|"
|
||||||
|
ITEM "1|Ultimo costo"
|
||||||
|
ITEM "2|Media costi"
|
||||||
|
ITEM "4|Costo standard"
|
||||||
|
ITEM "5|Costo medio"
|
||||||
|
ITEM "6|Costo medio ponderato"
|
||||||
|
FIELD CODNOTE
|
||||||
|
END
|
||||||
|
|
||||||
|
GROUPBOX F_CDC0 78 6
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 15 "@bAnalitica"
|
||||||
|
END
|
||||||
|
|
||||||
|
ENDPAGE
|
||||||
|
|
||||||
|
PAGE "Righe" 0 2 0 0
|
||||||
|
|
||||||
|
TLIST F_FASI 60 -1
|
||||||
|
BEGIN
|
||||||
|
PROMPT 0 2 ""
|
||||||
|
DISPLAY "Fasi@15" CODART
|
||||||
|
DISPLAY "Costo@7R" QTAGG5
|
||||||
|
DISPLAY "Prezzo@7R" PREZZO
|
||||||
|
DISPLAY "Descrizione@35" DESCR
|
||||||
|
END
|
||||||
|
|
||||||
|
BUTTON F_FASENEW 8 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 0 "Nuovo"
|
||||||
|
PICTURE BMP_NEWREC
|
||||||
|
PICTURE BMP_NEWRECDN
|
||||||
|
END
|
||||||
|
|
||||||
|
BUTTON F_FASEDIT 8 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT 12 0 "Modifica"
|
||||||
|
PICTURE BMP_EDIT
|
||||||
|
FLAGS "D"
|
||||||
|
END
|
||||||
|
|
||||||
|
BUTTON F_FASEUP 3 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT 23 0 "Su"
|
||||||
|
PICTURE BMP_DARROWU
|
||||||
|
FLAGS "D"
|
||||||
|
END
|
||||||
|
|
||||||
|
BUTTON F_FASEDN 3 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT 29 0 "Giù"
|
||||||
|
PICTURE BMP_DARROWD
|
||||||
|
FLAGS "D"
|
||||||
|
END
|
||||||
|
|
||||||
|
BUTTON F_FASELT 3 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT 35 0 "<<"
|
||||||
|
PICTURE BMP_DARROWL
|
||||||
|
FLAGS "D"
|
||||||
|
END
|
||||||
|
|
||||||
|
BUTTON F_FASERT 3 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT 41 0 ">>"
|
||||||
|
PICTURE BMP_DARROWR
|
||||||
|
FLAGS "D"
|
||||||
|
END
|
||||||
|
|
||||||
|
TEXT DLG_NULL
|
||||||
|
BEGIN
|
||||||
|
PROMPT 50 0 "Fase max:"
|
||||||
|
END
|
||||||
|
|
||||||
|
LIST F_FASEMAX 1 9
|
||||||
|
BEGIN
|
||||||
|
PROMPT 50 1 ""
|
||||||
|
ITEM "1|1 Livello"
|
||||||
|
ITEM "2|2 Livelli"
|
||||||
|
ITEM "3|3 Livelli"
|
||||||
|
ITEM "4|4 Livelli"
|
||||||
|
FIELD NCOLLI
|
||||||
|
END
|
||||||
|
|
||||||
|
SPREADSHEET F_DISTINTE 0 11
|
||||||
|
BEGIN
|
||||||
|
PROMPT 65 0 ""
|
||||||
|
ITEM "Distinta@20"
|
||||||
|
ITEM "Descrizione@50"
|
||||||
|
ITEM "U.M."
|
||||||
|
ITEM "Quantità@9"
|
||||||
|
ITEM "Costo@9R"
|
||||||
|
ITEM "Prezzo@9R"
|
||||||
|
END
|
||||||
|
|
||||||
|
SPREADSHEET F_ARTICOLI 0 7
|
||||||
|
BEGIN
|
||||||
|
PROMPT 65 11 ""
|
||||||
|
ITEM "Articolo@20"
|
||||||
|
ITEM "Descrizione@50"
|
||||||
|
ITEM "U.M."
|
||||||
|
ITEM "Quantità@9R"
|
||||||
|
ITEM "Costo@9R"
|
||||||
|
END
|
||||||
|
|
||||||
|
SPREADSHEET F_MISURE
|
||||||
|
BEGIN
|
||||||
|
PROMPT 65 18 ""
|
||||||
|
ITEM "Descrizione@50"
|
||||||
|
ITEM "Numero@9"
|
||||||
|
ITEM "Lunghezza@9"
|
||||||
|
ITEM "Larghezza@9"
|
||||||
|
ITEM "Altezza@9"
|
||||||
|
END
|
||||||
|
|
||||||
|
ENDPAGE
|
||||||
|
|
||||||
|
ENDMASK
|
||||||
|
|
||||||
|
PAGE "Distinta" -1 -1 60 6
|
||||||
|
|
||||||
|
STRING 101 20
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 1 "Distinta "
|
||||||
|
USE LF_DIST
|
||||||
|
INPUT CODDIST 101
|
||||||
|
DISPLAY "Codice@20" CODDIST
|
||||||
|
DISPLAY "Descrizione@50" DESCR
|
||||||
|
DISPLAY "U.M." UM
|
||||||
|
DISPLAY "Prezzo@V" PREZZO
|
||||||
|
OUTPUT 101 CODDIST
|
||||||
|
OUTPUT 102 DESCR
|
||||||
|
OUTPUT 103 UM
|
||||||
|
OUTPUT 105 PREZZO
|
||||||
|
CHEKTYPE SEARCH
|
||||||
|
ADD RUN db0 -4
|
||||||
|
FIELD CODART
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING 102 50 45
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 2 "Descriz. "
|
||||||
|
USE LF_DIST KEY 2
|
||||||
|
INPUT DESCR 105
|
||||||
|
DISPLAY "Descrizione@50" DESCR
|
||||||
|
DISPLAY "Codice@20" CODDIST
|
||||||
|
DISPLAY "U.M." UM
|
||||||
|
DISPLAY "Prezzo@V" PREZZO
|
||||||
|
COPY OUTPUT 101
|
||||||
|
CHEKTYPE SEARCH
|
||||||
|
FIELD DESCR
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING 103 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 3 "U.M. "
|
||||||
|
USE %UMS
|
||||||
|
INPUT CODTAB 103
|
||||||
|
DISPLAY "Codice" CODTAB
|
||||||
|
DISPLAY "Descrizione@50" S0
|
||||||
|
OUTPUT 103 CODTAB
|
||||||
|
CHECKTYPE NORMAL
|
||||||
|
FIELD UMQTA
|
||||||
|
END
|
||||||
|
|
||||||
|
NUMBER 104 9 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT 11 3 "Quantità "
|
||||||
|
FIELD QTA
|
||||||
|
END
|
||||||
|
|
||||||
|
CURRENCY 105 9
|
||||||
|
BEGIN
|
||||||
|
PROMPT 37 3 "Costo "
|
||||||
|
FIELD QTAGG5
|
||||||
|
END
|
||||||
|
|
||||||
|
CURRENCY 106 9
|
||||||
|
BEGIN
|
||||||
|
PROMPT 37 4 "Prezzo "
|
||||||
|
FIELD PREZZO
|
||||||
|
END
|
||||||
|
|
||||||
|
ENDPAGE
|
||||||
|
|
||||||
|
TOOLBAR "" 0 0 0 2
|
||||||
|
|
||||||
|
BUTTON DLG_OK 2 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 1 ""
|
||||||
|
END
|
||||||
|
|
||||||
|
BUTTON DLG_DELREC 2 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 1 ""
|
||||||
|
END
|
||||||
|
|
||||||
|
BUTTON DLG_CANCEL 2 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT 3 1 ""
|
||||||
|
END
|
||||||
|
|
||||||
|
ENDPAGE
|
||||||
|
ENDMASK
|
||||||
|
|
||||||
|
PAGE "Riga" -1 -1 50 5
|
||||||
|
|
||||||
|
STRING 101 20
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 1 "Articolo "
|
||||||
|
USE LF_ANAMAG
|
||||||
|
INPUT CODART 101
|
||||||
|
DISPLAY "Codice@20" CODART
|
||||||
|
DISPLAY "Descrizione@50" DESCR
|
||||||
|
OUTPUT 101 CODART
|
||||||
|
OUTPUT 102 DESCR
|
||||||
|
CHEKTYPE NORMAL
|
||||||
|
FIELD CODART
|
||||||
|
ADD RUN ve2 -3
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING 102 50 40
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 2 "Descriz. "
|
||||||
|
USE LF_ANAMAG KEY 2
|
||||||
|
INPUT DESCR 102
|
||||||
|
DISPLAY "Descrizione@50" DESCR
|
||||||
|
DISPLAY "Codice@20" CODART
|
||||||
|
COPY OUTPUT 101
|
||||||
|
FIELD DESCR
|
||||||
|
ADD RUN ve2 -3
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING 103 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 3 "U.M. "
|
||||||
|
USE LF_UMART KEY 2
|
||||||
|
JOIN %UMS INTO CODTAB=UM
|
||||||
|
INPUT CODART 101 SELECT
|
||||||
|
INPUT UM 103
|
||||||
|
DISPLAY "Codice" UM
|
||||||
|
DISPLAY "Descrizione@50" LF_TABCOM->S0
|
||||||
|
OUTPUT 103 UM
|
||||||
|
CHECKTYPE NORMAL
|
||||||
|
FIELD UMQTA
|
||||||
|
END
|
||||||
|
|
||||||
|
NUMBER 104 9 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT 11 3 "Quantità "
|
||||||
|
FIELD QTA
|
||||||
|
END
|
||||||
|
|
||||||
|
CURRENCY 105 9
|
||||||
|
BEGIN
|
||||||
|
PROMPT 31 3 "Costo "
|
||||||
|
FIELD QTAGG5
|
||||||
|
END
|
||||||
|
|
||||||
|
ENDPAGE
|
||||||
|
|
||||||
|
TOOLBAR "" 0 0 0 2
|
||||||
|
|
||||||
|
BUTTON DLG_OK 2 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 1 ""
|
||||||
|
END
|
||||||
|
|
||||||
|
BUTTON DLG_DELREC 2 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 1 ""
|
||||||
|
END
|
||||||
|
|
||||||
|
BUTTON DLG_CANCEL 2 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT 3 1 ""
|
||||||
|
END
|
||||||
|
|
||||||
|
ENDPAGE
|
||||||
|
ENDMASK
|
||||||
|
|
||||||
|
PAGE "Misura" -1 -1 60 8
|
||||||
|
|
||||||
|
STRING 101 50 45
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 1 "Descriz. "
|
||||||
|
FIELD DESCR
|
||||||
|
END
|
||||||
|
|
||||||
|
NUMBER 102 9
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 2 "Numero "
|
||||||
|
FIELD QTA
|
||||||
|
END
|
||||||
|
|
||||||
|
NUMBER 103 9 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 3 "Lunghezza "
|
||||||
|
FIELD QTAGG1
|
||||||
|
END
|
||||||
|
|
||||||
|
NUMBER 104 9 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 4 "Larghezza "
|
||||||
|
FIELD QTAGG2
|
||||||
|
END
|
||||||
|
|
||||||
|
NUMBER 105 9 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 5 "Altezza "
|
||||||
|
FIELD QTAGG3
|
||||||
|
END
|
||||||
|
|
||||||
|
NUMBER 106 9 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 6 "Totale "
|
||||||
|
FIELD QTA
|
||||||
|
FLAGS "DG"
|
||||||
|
DRIVENBY 102 103 104 105
|
||||||
|
NUM_CALC #102*IF(#103,#103,1)*IF(#104,#104,1)*IF(#105,#105,1)
|
||||||
|
END
|
||||||
|
|
||||||
|
ENDPAGE
|
||||||
|
|
||||||
|
TOOLBAR "" 0 0 0 2
|
||||||
|
|
||||||
|
BUTTON DLG_OK 2 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 1 ""
|
||||||
|
END
|
||||||
|
|
||||||
|
BUTTON DLG_DELREC 2 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 1 ""
|
||||||
|
END
|
||||||
|
|
||||||
|
BUTTON DLG_CANCEL 2 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT 3 1 ""
|
||||||
|
END
|
||||||
|
|
||||||
|
ENDPAGE
|
||||||
|
ENDMASK
|
415
pe/pe1401.cpp
Normal file
415
pe/pe1401.cpp
Normal file
@ -0,0 +1,415 @@
|
|||||||
|
#include "pe1401.h"
|
||||||
|
|
||||||
|
#include <diction.h>
|
||||||
|
#include <mask.h>
|
||||||
|
#include <urldefid.h>
|
||||||
|
|
||||||
|
#include <doc.h>
|
||||||
|
#include <rdoc.h>
|
||||||
|
#include "pe1400.h"
|
||||||
|
|
||||||
|
bool TPreventivo_tree::add_lastson(TObject* obj)
|
||||||
|
{
|
||||||
|
CHECK(obj != NULL && obj->is_kind_of(CLASS_RECTYPE), "Record non valido per preventivo");
|
||||||
|
CHECK(((TRectype*)obj)->get(RDOC_TIPORIGA).full(), "TIPORIGA vuoto");
|
||||||
|
bool done = false;
|
||||||
|
if (goto_firstson()) // Se ha almeno un figlio ...
|
||||||
|
{
|
||||||
|
while (goto_rbrother()); // ... allora vai all'ultimo fratello
|
||||||
|
done = add_rbrother(obj); // ed aggiungi ultimo fratello
|
||||||
|
}
|
||||||
|
else
|
||||||
|
done = add_son(obj); // Aggiungi primogenito
|
||||||
|
return done;
|
||||||
|
}
|
||||||
|
|
||||||
|
TPreventivo_level TPreventivo_tree::last_fase_level() const
|
||||||
|
{
|
||||||
|
const int mf = owner().mask().get_int(F_FASEMAX);
|
||||||
|
return TPreventivo_level(pl_fase1 + mf - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TPreventivo_tree::goto_last_fase(TPreventivo_level sublevel)
|
||||||
|
{
|
||||||
|
bool ok = goto_root() && goto_firstson();
|
||||||
|
if (ok)
|
||||||
|
{
|
||||||
|
while (goto_rbrother()); // goto last son
|
||||||
|
|
||||||
|
if (sublevel > pl_fase1)
|
||||||
|
{
|
||||||
|
const TPreventivo_level mf = last_fase_level();
|
||||||
|
if (sublevel > mf)
|
||||||
|
sublevel = mf;
|
||||||
|
|
||||||
|
while (level() < sublevel)
|
||||||
|
{
|
||||||
|
if (goto_firstson())
|
||||||
|
while (goto_rbrother());
|
||||||
|
else
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
ok = level() == sublevel;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ok;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TPreventivo_tree::goto_last_dist()
|
||||||
|
{
|
||||||
|
bool ok = goto_last_fase(pl_distinta); // pl_distinta = dummy value for maximum depth
|
||||||
|
if (ok)
|
||||||
|
{
|
||||||
|
ok = goto_firstson();
|
||||||
|
if (ok)
|
||||||
|
while (goto_rbrother());
|
||||||
|
}
|
||||||
|
return ok;
|
||||||
|
}
|
||||||
|
|
||||||
|
TRectype* TPreventivo_tree::new_row(TPreventivo_level level) const
|
||||||
|
{
|
||||||
|
const TMask& m = owner().mask();
|
||||||
|
TRectype* rec = new TRectype(level == pl_documento ? LF_DOC : LF_RIGHEDOC);
|
||||||
|
rec->put(RDOC_PROVV, 'D');
|
||||||
|
rec->put(RDOC_ANNO, m.get(F_ANNO));
|
||||||
|
rec->put(RDOC_CODNUM, m.get(F_CODNUM));
|
||||||
|
rec->put(RDOC_NDOC, m.get(F_NDOC));
|
||||||
|
switch (level)
|
||||||
|
{
|
||||||
|
case pl_distinta : rec->put(RDOC_TIPORIGA, tipo_dist()); rec->put(RDOC_DESCR, TR("Nuova distinta"));break;
|
||||||
|
case pl_dettaglio: rec->put(RDOC_TIPORIGA, tipo_dett()); rec->put(RDOC_DESCR, TR("Nuova riga"));break;
|
||||||
|
case pl_misura : rec->put(RDOC_TIPORIGA, tipo_misu()); rec->put(RDOC_DESCR, TR("Nuova misura"));break;
|
||||||
|
default : rec->put(RDOC_TIPORIGA, tipo_fasi()); rec->put(RDOC_DESCR, TR("Nuova fase")); rec->put(RPRV_LEVEL, level-pl_fase1); break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return rec;
|
||||||
|
}
|
||||||
|
|
||||||
|
TRectype* TPreventivo_tree::dist(const TString& fase, int n, bool create)
|
||||||
|
{
|
||||||
|
TRectype* rec = NULL;
|
||||||
|
if (goto_node(fase))
|
||||||
|
{
|
||||||
|
if (goto_firstson())
|
||||||
|
{
|
||||||
|
int i = 0;
|
||||||
|
for (; i < n && goto_rbrother(); i++);
|
||||||
|
if (i < n)
|
||||||
|
{
|
||||||
|
if (create)
|
||||||
|
add_rbrother(rec = new_row(pl_distinta));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
rec = curr_row();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (create)
|
||||||
|
add_son(rec = new_row(pl_distinta));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return rec;
|
||||||
|
}
|
||||||
|
|
||||||
|
TRectype* TPreventivo_tree::dett(const TString& dist, int n, bool create)
|
||||||
|
{
|
||||||
|
TRectype* rec = NULL;
|
||||||
|
if (goto_node(dist))
|
||||||
|
{
|
||||||
|
if (goto_firstson())
|
||||||
|
{
|
||||||
|
if (level() == pl_dettaglio)
|
||||||
|
{
|
||||||
|
int i = 0;
|
||||||
|
for (; i < n && goto_rbrother() && level() == pl_dettaglio; i++);
|
||||||
|
if (i == n)
|
||||||
|
rec = curr_row();
|
||||||
|
}
|
||||||
|
if (rec == NULL && create)
|
||||||
|
{
|
||||||
|
if (level() == pl_dettaglio)
|
||||||
|
add_rbrother(rec = new_row(pl_dettaglio));
|
||||||
|
else
|
||||||
|
add_lbrother(rec = new_row(pl_dettaglio));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (create && n == 0)
|
||||||
|
add_son(rec = new_row(pl_dettaglio));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return rec;
|
||||||
|
}
|
||||||
|
|
||||||
|
TRectype* TPreventivo_tree::misu(const TString& dist, int n, bool create)
|
||||||
|
{
|
||||||
|
TRectype* rec = NULL;
|
||||||
|
if (goto_node(dist))
|
||||||
|
{
|
||||||
|
CHECKS(level() == pl_distinta, "Distinta non valida", (const char*)dist);
|
||||||
|
if (goto_firstson())
|
||||||
|
{
|
||||||
|
int i = level() == pl_misura ? 0 : -1;
|
||||||
|
while (i < n && goto_rbrother())
|
||||||
|
if (level() == pl_misura) i++;
|
||||||
|
if (i < n)
|
||||||
|
{
|
||||||
|
if (create)
|
||||||
|
add_rbrother(rec = new_row(pl_misura));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
rec = curr_row();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (create && n == 0)
|
||||||
|
add_son(rec = new_row(pl_misura));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return rec;
|
||||||
|
}
|
||||||
|
|
||||||
|
TPreventivo_level TPreventivo_tree::level(const TRectype& rec) const
|
||||||
|
{
|
||||||
|
TPreventivo_level lev = pl_documento;
|
||||||
|
if (rec.num() == LF_RIGHEDOC)
|
||||||
|
{
|
||||||
|
const TString& t = rec.get(RDOC_TIPORIGA);
|
||||||
|
if (t.full())
|
||||||
|
{
|
||||||
|
lev = pl_fase1;
|
||||||
|
if (t == _strFasi)
|
||||||
|
lev = TPreventivo_level(lev + rec.get_int(RPRV_LEVEL)); else
|
||||||
|
if (t == _strDist)
|
||||||
|
lev = pl_distinta; else
|
||||||
|
if (t == _strDett)
|
||||||
|
lev = pl_dettaglio; else
|
||||||
|
if (t == _strMisu)
|
||||||
|
lev = pl_misura;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return lev;
|
||||||
|
}
|
||||||
|
|
||||||
|
TPreventivo_level TPreventivo_tree::level() const
|
||||||
|
{
|
||||||
|
TPreventivo_level lev = pl_documento;
|
||||||
|
TRectype* rec = curr_row();
|
||||||
|
if (rec != NULL)
|
||||||
|
lev = level(*rec);
|
||||||
|
return lev;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TPreventivo_tree::could_have_son() const
|
||||||
|
{ return level() < pl_distinta; }
|
||||||
|
|
||||||
|
bool TPreventivo_tree::get_description(TString& str) const
|
||||||
|
{
|
||||||
|
const TRectype* rec = curr_row();
|
||||||
|
bool ok = rec != NULL && !rec->empty();
|
||||||
|
if (ok)
|
||||||
|
{
|
||||||
|
if (rec->num() == LF_DOC)
|
||||||
|
{
|
||||||
|
const TMask& m = owner().mask();
|
||||||
|
str = m.get(F_NPREV);
|
||||||
|
if (m.field(F_NREV).shown())
|
||||||
|
str << '.' << m.get(F_NREV);
|
||||||
|
str << TR(" del ") << m.get(F_DATADOC);
|
||||||
|
} else
|
||||||
|
if (rec->num() == LF_RIGHEDOC)
|
||||||
|
{
|
||||||
|
str = rec->get(RDOC_DESCR);
|
||||||
|
if (str.blank())
|
||||||
|
str = rec->get(RDOC_CODART);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
NFCHECK("Bad tree record");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
NFCHECK("NULL tree record");
|
||||||
|
return ok;
|
||||||
|
}
|
||||||
|
|
||||||
|
TFieldtypes TPreventivo_tree::get_var(const TString& name, TVariant& var) const
|
||||||
|
{
|
||||||
|
TFieldtypes ft = _nullfld;
|
||||||
|
const TRectype* rec = curr_row();
|
||||||
|
if (rec != NULL && !rec->empty())
|
||||||
|
{
|
||||||
|
if (rec->num() == LF_DOC)
|
||||||
|
{
|
||||||
|
const TMask& m = owner().mask();
|
||||||
|
if (name == RDOC_CODART)
|
||||||
|
{
|
||||||
|
TString16 str = m.get(F_NPREV);
|
||||||
|
if (m.field(F_NREV).shown())
|
||||||
|
str << '.' << m.get(F_NREV);
|
||||||
|
var = str;
|
||||||
|
ft = _alfafld;
|
||||||
|
} else
|
||||||
|
if (name == RDOC_DESCR)
|
||||||
|
{
|
||||||
|
TString80 str = m.get(F_NOTE);
|
||||||
|
if (str.blank())
|
||||||
|
get_description(str);
|
||||||
|
var = str;
|
||||||
|
ft = _alfafld;
|
||||||
|
} else
|
||||||
|
if (name == RDOC_PREZZO || name == RPRV_COSTO)
|
||||||
|
{
|
||||||
|
real c, p; ((TPreventivo_tree*)this)->ricalcola(c, p);
|
||||||
|
if (name == RDOC_PREZZO )
|
||||||
|
var = p.stringa(0,2);
|
||||||
|
else
|
||||||
|
var = c.stringa(0,2);
|
||||||
|
ft = _realfld;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ft = rec->type(name);
|
||||||
|
if (ft > _nullfld)
|
||||||
|
{
|
||||||
|
if (ft == _realfld)
|
||||||
|
{
|
||||||
|
if ((name == RDOC_PREZZO || name == RPRV_COSTO) && level() == pl_distinta)
|
||||||
|
{
|
||||||
|
real c, p; ((TPreventivo_tree*)this)->ricalcola(c, p);
|
||||||
|
if (name == RDOC_PREZZO )
|
||||||
|
var = p.stringa(0,2);
|
||||||
|
else
|
||||||
|
var = c.stringa(0,2);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
var = rec->get_real(name).stringa(0, 2);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
var = rec->get(name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ft;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
TImage* TPreventivo_tree::image(bool sel) const
|
||||||
|
{
|
||||||
|
const TPreventivo_level pl = level();
|
||||||
|
if (pl <= pl_distinta)
|
||||||
|
{
|
||||||
|
const bool ex = expanded();
|
||||||
|
if (has_son())
|
||||||
|
return get_res_image(ex ? BMP_DIRDNSEL : BMP_DIRSEL);
|
||||||
|
else
|
||||||
|
return get_res_image(ex ? BMP_DIRDN : BMP_DIR);
|
||||||
|
}
|
||||||
|
return TObject_tree::image(sel);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Aggiunge un record alla fine dell'albero in base al tipo della riga (usato solo in lettura iniziale)
|
||||||
|
bool TPreventivo_tree::append_row(const TRectype& rec)
|
||||||
|
{
|
||||||
|
const TPreventivo_level pl = level(rec);
|
||||||
|
if (pl == pl_documento)
|
||||||
|
{
|
||||||
|
// Se aggiungo un documento allora svuoto albero e ricreo radice
|
||||||
|
if (goto_root())
|
||||||
|
kill_node();
|
||||||
|
return add_son(rec);
|
||||||
|
} else
|
||||||
|
if (pl == pl_dettaglio)
|
||||||
|
{
|
||||||
|
// Le righe di dettaglio devono precedere quelle di misura
|
||||||
|
if (goto_last_dist())
|
||||||
|
{
|
||||||
|
if (goto_firstson())
|
||||||
|
{
|
||||||
|
while (level() == pl_dettaglio && goto_rbrother());
|
||||||
|
if (level() == pl_dettaglio)
|
||||||
|
return add_rbrother(rec);
|
||||||
|
else
|
||||||
|
return add_lbrother(rec);
|
||||||
|
}
|
||||||
|
return add_son(rec);
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
if (pl == pl_misura)
|
||||||
|
{
|
||||||
|
if (goto_last_dist())
|
||||||
|
return add_lastson(rec);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
goto_root();
|
||||||
|
while (level() < pl)
|
||||||
|
{
|
||||||
|
if (goto_firstson())
|
||||||
|
while (goto_rbrother());
|
||||||
|
else
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (level() < pl)
|
||||||
|
return add_lastson(rec);
|
||||||
|
else
|
||||||
|
return add_rbrother(rec);
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TPreventivo_tree::ricalcola(real& costo, real& prezzo)
|
||||||
|
{
|
||||||
|
bool ok = false;
|
||||||
|
const TPreventivo_level lev = level();
|
||||||
|
costo = prezzo = ZERO;
|
||||||
|
if (lev < pl_distinta && has_son())
|
||||||
|
{
|
||||||
|
TString16 id; curr_id(id);
|
||||||
|
for (bool go = goto_firstson(); go; go = goto_rbrother())
|
||||||
|
{
|
||||||
|
real c, p;
|
||||||
|
if (ricalcola(c, p))
|
||||||
|
{
|
||||||
|
costo += c;
|
||||||
|
prezzo += p;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ok = goto_node(id);
|
||||||
|
if (lev >= pl_fase1)
|
||||||
|
{
|
||||||
|
TRectype& rec = *curr_row();
|
||||||
|
rec.put(RDOC_QTA, 1);
|
||||||
|
rec.put(RPRV_COSTO, costo);
|
||||||
|
rec.put(RDOC_PREZZO, prezzo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ok = lev == pl_distinta;
|
||||||
|
if (ok)
|
||||||
|
{
|
||||||
|
const TRectype& rec = *curr_row();
|
||||||
|
const real qta = rec.get_real(RDOC_QTA);
|
||||||
|
if (!qta.is_zero())
|
||||||
|
{
|
||||||
|
costo = qta * rec.get_real(RPRV_COSTO);
|
||||||
|
prezzo = qta * rec.get_real(RDOC_PREZZO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ok;
|
||||||
|
}
|
||||||
|
|
||||||
|
TPreventivo_tree::TPreventivo_tree(TTree_field& owner) : _owner(owner)
|
||||||
|
{
|
||||||
|
// Legge i tipi riga standard per determinare i nodi dell'albero
|
||||||
|
_strFasi = ini_get_string(CONFIG_DITTA, "pe", "TipoRigaFase", "05");
|
||||||
|
_strDist = ini_get_string(CONFIG_DITTA, "pe", "TipoRigaDist", "01");
|
||||||
|
_strDett = ini_get_string(CONFIG_DITTA, "pe", "TipoRigaDett", "04");
|
||||||
|
_strMisu = ini_get_string(CONFIG_DITTA, "pe", "TipoRigaMisu", "09");
|
||||||
|
}
|
||||||
|
|
67
pe/pe1401.h
Normal file
67
pe/pe1401.h
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
#ifndef __PE1401_H
|
||||||
|
#define __PE1401_H
|
||||||
|
|
||||||
|
#ifndef __ISAM_H
|
||||||
|
#include <isam.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __TREE_H
|
||||||
|
#include <tree.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __TREECTRL_H
|
||||||
|
#include <treectrl.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
// TPreventivo_tree
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
enum TPreventivo_level { pl_documento = 0, pl_fase1 = 1, pl_fase2, pl_fase3, pl_fase4, pl_distinta=10, pl_dettaglio, pl_misura };
|
||||||
|
|
||||||
|
class TPreventivo_tree : public TObject_tree
|
||||||
|
{
|
||||||
|
TTree_field& _owner;
|
||||||
|
TString4 _strFasi, _strDist, _strDett, _strMisu;
|
||||||
|
|
||||||
|
private:
|
||||||
|
bool add_lastson(TObject* obj);
|
||||||
|
bool add_lastson(const TObject& obj) { return add_lastson(obj.dup()); }
|
||||||
|
|
||||||
|
protected:
|
||||||
|
bool goto_last_fase(TPreventivo_level level);
|
||||||
|
bool goto_last_dist();
|
||||||
|
|
||||||
|
public:
|
||||||
|
virtual bool could_have_son() const;
|
||||||
|
virtual bool get_description(TString& str) const;
|
||||||
|
virtual TFieldtypes get_var(const TString& name, TVariant& var) const;
|
||||||
|
|
||||||
|
virtual TImage* image(bool sel) const;
|
||||||
|
|
||||||
|
const TString& tipo_fasi() const { return _strFasi; }
|
||||||
|
const TString& tipo_dist() const { return _strDist; }
|
||||||
|
const TString& tipo_dett() const { return _strDett; }
|
||||||
|
const TString& tipo_misu() const { return _strMisu; }
|
||||||
|
|
||||||
|
TPreventivo_level level(const TRectype& rec) const;
|
||||||
|
TPreventivo_level level() const;
|
||||||
|
TPreventivo_level last_fase_level() const;
|
||||||
|
|
||||||
|
TRectype* new_row(TPreventivo_level level) const;
|
||||||
|
TRectype* curr_row() const { return (TRectype*)curr_node(); }
|
||||||
|
TTree_field& owner() const { return _owner; }
|
||||||
|
|
||||||
|
TRectype* dist(const TString& fase, int n, bool create = false);
|
||||||
|
TRectype* dett(const TString& dist, int n, bool create = false);
|
||||||
|
TRectype* misu(const TString& dist, int n, bool create = false);
|
||||||
|
bool ricalcola(real& costo, real& prezzo);
|
||||||
|
|
||||||
|
TPreventivo_tree(TTree_field& owner);
|
||||||
|
bool append_row(const TRectype& rec);
|
||||||
|
};
|
||||||
|
|
||||||
|
const TString& trova_elaborazione(const TRectype& doc);
|
||||||
|
bool genera_ordine(const TRectype& doc);
|
||||||
|
|
||||||
|
#endif
|
86
pe/pe1402.cpp
Normal file
86
pe/pe1402.cpp
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
#include "pe1401.h"
|
||||||
|
#include "../ve/velib04.h"
|
||||||
|
|
||||||
|
class TPreventivazione : public TElaborazione
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual bool elabora(TLista_documenti& doc_in, TLista_documenti& doc_out,
|
||||||
|
const TDate& data_elab, bool interattivo = false);
|
||||||
|
TPreventivazione(const TString& cod) : TElaborazione(cod) { }
|
||||||
|
};
|
||||||
|
|
||||||
|
bool TPreventivazione::elabora(TLista_documenti& doc_in, TLista_documenti& doc_out,
|
||||||
|
const TDate& data_elab, bool interattivo)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < doc_in.items(); i++)
|
||||||
|
{
|
||||||
|
if (i >= doc_out.items())
|
||||||
|
{
|
||||||
|
TDocumento* doc = new TDocumento('D', data_elab.year(), codice_numerazione_finale(), 0L);
|
||||||
|
doc->put(DOC_TIPODOC, tipo_finale());
|
||||||
|
doc->put(DOC_STATO, stato_finale());
|
||||||
|
doc_out.add(doc);
|
||||||
|
}
|
||||||
|
|
||||||
|
TDocumento& din = doc_in[i];
|
||||||
|
TDocumento& don = doc_out[i];
|
||||||
|
|
||||||
|
don.put(DOC_TIPOCF, din.get(DOC_TIPOCF));
|
||||||
|
don.put(DOC_CODCF, din.get(DOC_CODCF));
|
||||||
|
don.put(DOC_DATADOC, data_elab);
|
||||||
|
don.put(DOC_NOTE, din.get(DOC_NOTE));
|
||||||
|
don.put(DOC_CODCMS, din.get(DOC_CODCMS));
|
||||||
|
|
||||||
|
FOR_EACH_PHYSICAL_RDOC(din, r, rdoc)
|
||||||
|
{
|
||||||
|
if (rdoc->is_descrizione())
|
||||||
|
{
|
||||||
|
TRiga_documento& rout = don.new_row(rdoc->get(RDOC_TIPORIGA));
|
||||||
|
TDocumento::copy_data(rout, *rdoc);
|
||||||
|
} else
|
||||||
|
if (rdoc->is_merce())
|
||||||
|
{
|
||||||
|
TRiga_documento& rout = don.new_row(rdoc->get(RDOC_TIPORIGA));
|
||||||
|
TDocumento::copy_data(rout, *rdoc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
const TString& trova_elaborazione(const TRectype& doc)
|
||||||
|
{
|
||||||
|
TString8 cod;
|
||||||
|
TISAM_recordset eld("USE %ELD SELECT (I0==0)||(I0=4)");
|
||||||
|
const TString4 codnum = doc.get(DOC_CODNUM);
|
||||||
|
const TString4 tipodoc = doc.get(DOC_TIPODOC);
|
||||||
|
const TString4 stato = doc.get(DOC_STATO);
|
||||||
|
for (bool ok = eld.move_first(); ok; ok = eld.move_next())
|
||||||
|
{
|
||||||
|
const TString4 c = eld.get("CODTAB").as_string();
|
||||||
|
const TElaborazione e(c);
|
||||||
|
if (codnum != e.codice_numerazione_iniziale())
|
||||||
|
continue;
|
||||||
|
if (tipodoc != e.tipo_iniziale(0))
|
||||||
|
continue;
|
||||||
|
if (stato >= e.stato_finale_doc_iniziale())
|
||||||
|
continue;
|
||||||
|
cod = c;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return get_tmp_string() = cod;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool genera_ordine(const TRectype& doc)
|
||||||
|
{
|
||||||
|
const TString& codelab = trova_elaborazione(doc);
|
||||||
|
if (codelab.empty())
|
||||||
|
return false;
|
||||||
|
|
||||||
|
const TDate oggi(TODAY);
|
||||||
|
TLista_documenti doc_in, doc_out;
|
||||||
|
doc_in.add(new TDocumento(doc));
|
||||||
|
|
||||||
|
TPreventivazione prev(codelab);
|
||||||
|
return prev.elabora(doc_in, doc_out, oggi);
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user