Patch level :10.0
Files correlati : Ricompilazione Demo : [ ] Commento :aggiunta stampa contratti; aggiunta possibilità di usare rep personalizzati; aggiunta stampa contratti git-svn-id: svn://10.65.10.50/trunk@19498 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
47b0cd169e
commit
38d4268129
@ -45,6 +45,7 @@ protected:
|
||||
void save_listini(); //salva tutte le righe listini (padre e figli) così come sono sullo sheet (on_field)
|
||||
|
||||
real get_price(TSheet_field& sf, const int row, const short dlg_id) const;
|
||||
real get_price(TMask_field& fld) const;
|
||||
void set_price(TSheet_field& sf, const int row, const short dlg_id, real& price);
|
||||
void set_price(TMask_field& fld, real& price);
|
||||
bool arrotonda(const short dlg_id, real& price);
|
||||
@ -203,6 +204,17 @@ void TAggiorna_listini_edit_mask::save_children_list()
|
||||
|
||||
//metodi F_MULTILISTINI
|
||||
|
||||
real TAggiorna_listini_edit_mask::get_price(TMask_field& fld) const
|
||||
{
|
||||
TString16 str_prezzo = fld.get();
|
||||
if (fld.dlg() == S2_PREZZO)
|
||||
{
|
||||
str_prezzo.strip(".");
|
||||
str_prezzo.replace(',', '.');
|
||||
}
|
||||
return real(str_prezzo);
|
||||
}
|
||||
|
||||
//prende il prezzo del padre e sostituisce i '.' con le ','
|
||||
real TAggiorna_listini_edit_mask::get_price(TSheet_field& sf, const int row, const short dlg_id) const
|
||||
{
|
||||
@ -267,7 +279,7 @@ void TAggiorna_listini_edit_mask::set_price(TMask_field& fld, real& price)
|
||||
{
|
||||
const bool is_father_list = arrotonda(fld.dlg(), price);
|
||||
if (is_father_list)
|
||||
fld.set(price.stringa());
|
||||
fld.set(price.stringa(0, TCurrency::get_firm_dec(true)));
|
||||
else
|
||||
fld.set(price.string());
|
||||
}
|
||||
@ -742,7 +754,8 @@ bool TAggiorna_listini_edit_mask::on_field_event(TOperable_field& o, TField_even
|
||||
{
|
||||
//se il prezzo viene messo a 0 nel listino padre, si prepara ad eliminare l'articolo..
|
||||
//..come se fosse premuto DLG_USER (vedi DLG_USER qui sotto)
|
||||
if (real::is_null(o.get()))
|
||||
real father_price = get_price(o);
|
||||
if (father_price.is_zero())
|
||||
{
|
||||
TMask& rowmask = o.mask();
|
||||
rowmask.field(DLG_USER).on_hit();
|
||||
@ -751,7 +764,6 @@ bool TAggiorna_listini_edit_mask::on_field_event(TOperable_field& o, TField_even
|
||||
//..(articolo nuovo o resettato), sui prezzi figli viene messo il prezzo del padre
|
||||
{
|
||||
//per prima cosa sistema se stesso (è un padre ignobile!)
|
||||
real father_price = o.get();
|
||||
set_price(o, father_price);
|
||||
|
||||
//poi i figli
|
||||
@ -793,7 +805,7 @@ bool TAggiorna_listini_edit_mask::on_field_event(TOperable_field& o, TField_even
|
||||
case S2_LIST10:
|
||||
if (e == fe_modify && jolly == 2)
|
||||
{
|
||||
real price = o.get();
|
||||
real price = get_price(o);
|
||||
set_price(o, price);
|
||||
_ask_save = true;
|
||||
}
|
||||
|
@ -29,7 +29,9 @@ TPrint_condven_mask::TPrint_condven_mask() : TAutomask("ve3500a")
|
||||
tipo = main_app().argv(2);
|
||||
|
||||
set(F_TIPO, tipo);
|
||||
if (tipo[0] == 'L')
|
||||
switch (tipo[0])
|
||||
{
|
||||
case 'L':
|
||||
{
|
||||
//il costruttore abilita/disabilita i campi delle categorie di vendita in base alla configurazione
|
||||
const bool gesliscv = ini_get_bool(CONFIG_DITTA, "ve", "GESLISCV");
|
||||
@ -39,6 +41,27 @@ TPrint_condven_mask::TPrint_condven_mask() : TAutomask("ve3500a")
|
||||
if (!gesliscv)
|
||||
efield(F_L_CATVEN).reset_key(1);
|
||||
}
|
||||
break;
|
||||
case 'C':
|
||||
{
|
||||
const bool gescf = ini_get_bool(CONFIG_DITTA, "ve", "GESCONCC");
|
||||
enable(F_C_TIPOCF, gescf);
|
||||
enable(F_C_CODCF, gescf);
|
||||
//anche i campi dei clifo stanno in chiave!
|
||||
if (!gescf)
|
||||
{
|
||||
efield(F_C_TIPOCF).reset_key(1);
|
||||
efield(F_C_CODCF).reset_key(1);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'O':
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
bool TPrint_condven_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||
@ -104,10 +127,13 @@ void TPrint_condven::print_or_preview(const bool stampa)
|
||||
{
|
||||
if (_mask->check_fields())
|
||||
{
|
||||
TString8 rep_name;
|
||||
rep_name << "ve3500" << _mask->get(F_TIPO);
|
||||
//l'utonto può scegliere che report usare (personalizzato!)
|
||||
TString rep_name = _mask->get(F_REPORT);
|
||||
//se il rep non è selezionato usa quello standard
|
||||
if (rep_name.empty())
|
||||
rep_name << "ve3500" << _mask->get(F_TIPO);
|
||||
|
||||
TPrint_condven_report rep;
|
||||
TPrint_condven_report rep;
|
||||
rep.load(rep_name);
|
||||
|
||||
rep.mask2report(*_mask); //setta i valori della maschera sul report
|
||||
|
@ -24,4 +24,6 @@
|
||||
#define F_DARAGFIS 230
|
||||
#define F_DADESRAGFIS 231
|
||||
#define F_ARAGFIS 232
|
||||
#define F_ADESRAGFIS 233
|
||||
#define F_ADESRAGFIS 233
|
||||
|
||||
#define F_REPORT 240
|
||||
|
@ -113,7 +113,6 @@ END
|
||||
STRING F_C_RAGSOC 50 47
|
||||
BEGIN
|
||||
PROMPT 27 3 ""
|
||||
FLAGS "U"
|
||||
USE LF_CLIFO KEY 2
|
||||
INPUT TIPOCF F_C_TIPOCF
|
||||
INPUT RAGSOC F_C_RAGSOC
|
||||
@ -123,7 +122,6 @@ BEGIN
|
||||
COPY OUTPUT F_C_CODCF
|
||||
CHECKTYPE NORMAL
|
||||
GROUP 2
|
||||
FIELD #RAGSOC
|
||||
END
|
||||
|
||||
TEXT DLG_NULL
|
||||
@ -403,6 +401,13 @@ BEGIN
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
STRING F_REPORT 50
|
||||
BEGIN
|
||||
PROMPT 2 18 "Report personalizzato "
|
||||
RSELECT ""
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
205
ve/ve3500c.rep
Executable file
205
ve/ve3500c.rep
Executable file
@ -0,0 +1,205 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<report name="ve3500c" lpi="6">
|
||||
<description>Stampa contratti</description>
|
||||
<font face="Arial" size="8" />
|
||||
<section type="Head">
|
||||
<font face="Arial" bold="1" size="8" />
|
||||
<field x="81" type="Testo" align="center" width="12" pattern="1" text="Sconti" />
|
||||
<field x="95" type="Testo" align="center" width="15" pattern="1" text="Omaggi" />
|
||||
<field x="1" y="0.5" type="Testo" width="20" pattern="1" text="Codice" />
|
||||
<field x="22" y="0.5" type="Testo" width="35" pattern="1" text="Descrizione" />
|
||||
<field x="59.5" y="0.5" type="Testo" align="right" width="11" pattern="1" text="Prezzo" />
|
||||
<field x="72" y="0.5" type="Testo" align="center" width="3" pattern="1" text="IVA" />
|
||||
<field x="76" y="0.5" type="Testo" width="4" pattern="1" text="%Prv" />
|
||||
<field x="81.5" y="0.75" type="Testo" align="center" width="12" pattern="1" text="Formula - Qta base">
|
||||
<font face="Arial Narrow" size="8" />
|
||||
</field>
|
||||
<field x="95" y="0.75" type="Testo" align="center" width="15" pattern="1" text="Qta base - Prezzo - UM">
|
||||
<font face="Arial Narrow" size="8" />
|
||||
</field>
|
||||
<field border="1" x="1" y="1.5" type="Linea" width="116" height="0" pattern="1" />
|
||||
</section>
|
||||
<section type="Head" level="1">
|
||||
<font face="Arial" bold="1" size="8" />
|
||||
<field border="2" radius="200" x="17" y="0.75" type="Rettangolo" width="75" height="4" pattern="1" />
|
||||
<field x="18" y="1.5" type="Testo" width="16" pattern="1" text="CONTRATTO">
|
||||
<font face="Arial" bold="1" size="12" />
|
||||
</field>
|
||||
<field x="35.5" y="1.5" type="Stringa" width="5" pattern="1">
|
||||
<font face="Arial" bold="1" size="12" />
|
||||
<source>COD</source>
|
||||
<prescript description="H1.0 PRESCRIPT">MESSAGE ISAMREAD,52,TIPO=C!TIPOCF=TIPOCF!CODCF=CODCF!COD=COD,101=DESCR!102=VALIN!103=VALFIN!104=OBBLIG!201=IMPLORDI!202=GESTUM!203=GESTSCAGL!204=GESTSCO
|
||||
</prescript>
|
||||
<postscript description="H1.0 POSTSCRIPT">MESSAGE COPY,F0.100</postscript>
|
||||
</field>
|
||||
<field x="18" y="3" type="Array" width="12" pattern="1">
|
||||
<font face="Arial" bold="1" size="12" />
|
||||
<source>TIPOCF</source>
|
||||
<prescript description="H1.0 PRESCRIPT">MESSAGE COPY,F0.102</prescript>
|
||||
<list>
|
||||
<li Value="Cliente" Code="C" />
|
||||
<li Value="Fornitore" Code="F" />
|
||||
</list>
|
||||
</field>
|
||||
<field x="32" y="3" type="Numero" align="right" width="8" pattern="1">
|
||||
<font face="Arial" bold="1" size="12" />
|
||||
<source>CODCF</source>
|
||||
<prescript description="H1.0 PRESCRIPT">MESSAGE COPY,F0.103</prescript>
|
||||
</field>
|
||||
<field x="41.5" y="3" type="Stringa" width="50" pattern="1">
|
||||
<font face="Arial" bold="1" size="12" />
|
||||
<prescript description="H1.0 PRESCRIPT">MESSAGE ISAMREAD,20,TIPOCF=TIPOCF!CODCF=CODCF,RAGSOC</prescript>
|
||||
<postscript description="H1.0 POSTSCRIPT">MESSAGE COPY,F0.104</postscript>
|
||||
</field>
|
||||
<field x="1" y="6" type="Testo" width="12" pattern="1" text="Inizio validit&#E0;:" />
|
||||
<field x="26" y="6" type="Testo" width="10" pattern="1" text="Fine validit&#E0;:" />
|
||||
<field x="1" y="7.5" type="Testo" width="12" pattern="1" text="Importi lordi:" />
|
||||
<field x="16" y="7.5" type="Testo" width="12" pattern="1" text="Gest. UM:" />
|
||||
<field x="29" y="7.5" type="Testo" width="13" pattern="1" text="Gest. scaglioni:" />
|
||||
<field x="47" y="7.5" type="Testo" width="11" pattern="1" text="Gest. sconti:" />
|
||||
<field x="63" y="7.5" type="Testo" width="12" pattern="1" text="Obbligatorio:" />
|
||||
<field border="2" y="8.5" type="Linea" width="117" height="0" pattern="1" />
|
||||
<field x="41.5" y="1.5" type="Stringa" width="50" id="101" pattern="1">
|
||||
<font face="Arial" bold="1" size="12" />
|
||||
<prescript description="H1.101 PRESCRIPT">MESSAGE COPY,F0.101</prescript>
|
||||
</field>
|
||||
<field x="13" y="6" type="Data" width="10" id="102" pattern="1">
|
||||
<font face="Arial" size="8" />
|
||||
</field>
|
||||
<field x="37" y="6" type="Data" width="10" id="103" pattern="1">
|
||||
<font face="Arial" size="8" />
|
||||
</field>
|
||||
<field x="74" y="7.5" type="Array" width="2" id="104" pattern="1">
|
||||
<font face="Arial" size="8" />
|
||||
<list>
|
||||
<li Value="No" Code=" " />
|
||||
<li Value="Si" Code="X" />
|
||||
</list>
|
||||
</field>
|
||||
<field x="12" y="7.5" type="Array" width="2" id="201" pattern="1">
|
||||
<font face="Arial" size="8" />
|
||||
<list>
|
||||
<li Value="No" Code=" " />
|
||||
<li Value="Si" Code="X" />
|
||||
</list>
|
||||
</field>
|
||||
<field x="24" y="7.5" type="Array" width="2" id="202" pattern="1">
|
||||
<font face="Arial" size="8" />
|
||||
<list>
|
||||
<li Value="No" Code=" " />
|
||||
<li Value="Si" Code="X" />
|
||||
</list>
|
||||
</field>
|
||||
<field x="42" y="7.5" type="Array" width="2" id="203" pattern="1">
|
||||
<font face="Arial" size="8" />
|
||||
<list>
|
||||
<li Value="No" Code=" " />
|
||||
<li Value="Si" Code="X" />
|
||||
</list>
|
||||
</field>
|
||||
<field x="57.5" y="7.5" type="Array" width="2" id="204" pattern="1">
|
||||
<font face="Arial" size="8" />
|
||||
<list>
|
||||
<li Value="No" Code=" " />
|
||||
<li Value="Si" Code="X" />
|
||||
</list>
|
||||
</field>
|
||||
</section>
|
||||
<section type="Head" level="2">
|
||||
<groupby>TIPORIGA="A"</groupby>
|
||||
<font face="Arial" bold="1" size="8" />
|
||||
<field border="1" x="1" y="1.5" type="Linea" width="116" height="0" pattern="1" />
|
||||
<field x="1" y="0.25" type="Array" width="25" id="101" pattern="1">
|
||||
<font italic="1" face="Arial" bold="1" size="8" />
|
||||
<source>TIPORIGA</source>
|
||||
<list>
|
||||
<li Value="Articoli" Code="A" />
|
||||
<li Value="Gruppi Merceologici" Code="G" />
|
||||
<li Value="Raggruppamenti fiscali" Code="R" />
|
||||
</list>
|
||||
</field>
|
||||
</section>
|
||||
<section type="Body" />
|
||||
<section type="Body" level="1">
|
||||
<field x="58.5" type="Prezzo" align="right" width="12" pattern="1" text="#########,@@">
|
||||
<source>PREZZO</source>
|
||||
</field>
|
||||
<field x="73" type="Stringa" width="3" pattern="1">
|
||||
<font face="Arial Narrow" size="8" />
|
||||
<source>CODIVA</source>
|
||||
</field>
|
||||
<field x="77" type="Numero" align="right" width="3" pattern="1" hide_zero="1">
|
||||
<font face="Arial Narrow" size="8" />
|
||||
<source>PERCPROVV</source>
|
||||
</field>
|
||||
<field x="81" type="Stringa" width="8" pattern="1">
|
||||
<font face="Arial Narrow" size="7" />
|
||||
<source>SCONTO</source>
|
||||
</field>
|
||||
<field x="89" type="Numero" align="right" width="5" pattern="1" hide_zero="1">
|
||||
<font face="Arial Narrow" size="7" />
|
||||
<source>QBASE</source>
|
||||
</field>
|
||||
<field x="95" type="Numero" align="right" width="5" pattern="1" hide_zero="1">
|
||||
<font face="Arial Narrow" size="7" />
|
||||
<source>QOM</source>
|
||||
</field>
|
||||
<field x="100" type="Prezzo" align="right" width="8" pattern="1" hide_zero="1" text="#########,@@">
|
||||
<font face="Arial Narrow" size="7" />
|
||||
<source>PROMAGGIO</source>
|
||||
</field>
|
||||
<field x="108.5" type="Stringa" width="2" pattern="1">
|
||||
<font face="Arial Narrow" size="7" />
|
||||
<source>UMOM</source>
|
||||
</field>
|
||||
<field type="Array" hidden="1" width="1" id="101" pattern="1">
|
||||
<source>TIPORIGA</source>
|
||||
<list>
|
||||
<li Value="Articolo" Code="A">MESSAGE HIDE,203|HIDE,303|SHOW,103</li>
|
||||
<li Value="Gr.Merc." Code="G">MESSAGE HIDE,103|HIDE,303|SHOW,203</li>
|
||||
<li Value="Ragg. fisc." Code="R">MESSAGE HIDE,103|HIDE,203|SHOW,303</li>
|
||||
</list>
|
||||
</field>
|
||||
<field x="1.5" type="Stringa" width="20" id="102" pattern="1">
|
||||
<source>CODRIGA</source>
|
||||
</field>
|
||||
<field x="22" type="Stringa" width="35" id="103" pattern="1">
|
||||
<font face="Arial Narrow" size="7" />
|
||||
<prescript description="B1.103 PRESCRIPT">MESSAGE ISAMREAD,47,CODART=#102,DESCR</prescript>
|
||||
</field>
|
||||
<field x="22" type="Stringa" width="35" id="203" pattern="1">
|
||||
<font face="Arial Narrow" size="7" />
|
||||
<prescript description="B1.203 PRESCRIPT">MESSAGE TABLEREAD,GMC,#102,S0</prescript>
|
||||
</field>
|
||||
<field x="22" type="Stringa" width="35" id="303" pattern="1">
|
||||
<font face="Arial Narrow" size="7" />
|
||||
<prescript description="B1.303 PRESCRIPT">MESSAGE TABLEREAD,RFA,#102,S0</prescript>
|
||||
</field>
|
||||
</section>
|
||||
<section type="Foot">
|
||||
<field border="1" x="1" y="0.5" type="Linea" width="116" height="0" pattern="1" />
|
||||
<field x="6" y="1" type="Testo" width="10" pattern="1" text="Contratto:" />
|
||||
<field x="104" y="1" type="Testo" width="5" pattern="1" text="Pag." />
|
||||
<field x="110" y="1" type="Numero" align="right" width="4" pattern="1">
|
||||
<source>#REPORT.PAGE</source>
|
||||
</field>
|
||||
<field x="14" y="1" type="Stringa" align="right" width="3" id="100" pattern="1" />
|
||||
<field x="18" y="1" type="Stringa" width="25" id="101" pattern="1" />
|
||||
<field x="59" y="1" type="Array" width="8" id="102" pattern="1">
|
||||
<list>
|
||||
<li Value="Cliente" Code="C" />
|
||||
<li Value="Fornitore" Code="F" />
|
||||
</list>
|
||||
</field>
|
||||
<field x="68" y="1" type="Numero" align="right" width="6" id="103" pattern="1" />
|
||||
<field x="75" y="1" type="Stringa" width="25" id="104" pattern="1" />
|
||||
</section>
|
||||
<section type="Foot" level="1" />
|
||||
<section type="Foot" level="2" />
|
||||
<sql>USE RCONDV
|
||||
SELECT ((TIPORIGA="A")(BETWEEN(CODRIGA,#DACODART,#ACODART))(BETWEEN(ANAMAG.GRMERC,#DAGRMERC,#AGRMERC))(BETWEEN(ANAMAG.RAGGFIS,#DARAGFIS,#ARAGFIS)))||((TIPORIGA="G")(BETWEEN(CODRIGA,#DAGRMERC,#AGRMERC)))||((TIPORIGA="R")(BETWEEN(CODRIGA,#DARAGFIS,#ARAGFIS)))
|
||||
JOIN ANAMAG INTO CODART=CODRIGA
|
||||
FROM TIPO=C TIPOCF=#TIPOCF CODCF=#CODCF COD=#COD
|
||||
TO TIPO=C TIPOCF=#TIPOCF CODCF=#CODCF COD=#COD
|
||||
</sql>
|
||||
</report>
|
Loading…
x
Reference in New Issue
Block a user