Patch level : 10.0 265
Files correlati : Ricompilazione Demo : [ ] Commento : Riportata la versione 3.2 patch 1353 git-svn-id: svn://10.65.10.50/trunk@18581 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
3bf951f42c
commit
d52681f795
@ -182,7 +182,6 @@ void TAnaprint_app::preprocess_etichette()
|
||||
_name = get_field(LF_ANAG,"RAGSOC");
|
||||
_cod = get_field(LF_ANAG,"CODANAGR");
|
||||
_cofi = get_field(LF_ANAG,"COFI");
|
||||
const TRectype& cc = look_com(get_field(LF_ANAG,"COMCORR"));
|
||||
if (_cofi.empty())
|
||||
_cofi = get_field(LF_ANAG,"PAIV");
|
||||
|
||||
@ -195,43 +194,50 @@ void TAnaprint_app::preprocess_etichette()
|
||||
switch (_ind_what)
|
||||
{
|
||||
case corrispondenza:
|
||||
_address = get_field(LF_ANAG,"INDCORR");
|
||||
_civ = get_field(LF_ANAG,"CIVCORR");
|
||||
_stato = look_tab("%STA",get_field(LF_ANAG,"STATOCORR"));
|
||||
_cap = get_field(LF_ANAG,"CAPCORR");
|
||||
_loc = get_field(LF_ANAG,"LOCCORR");
|
||||
_com = cc.get("DENCOM");
|
||||
_prov = cc.get("PROVCOM");
|
||||
if (_cap.empty())
|
||||
_cap = cc.get("CAPCOM");
|
||||
if (!_address.empty())
|
||||
break;
|
||||
{
|
||||
_address = get_field(LF_ANAG,"INDCORR");
|
||||
_civ = get_field(LF_ANAG,"CIVCORR");
|
||||
_stato = look_tab("%STA",get_field(LF_ANAG,"STATOCORR"));
|
||||
_cap = get_field(LF_ANAG,"CAPCORR");
|
||||
_loc = get_field(LF_ANAG,"LOCCORR");
|
||||
const TRectype& cc = look_com(get_field(LF_ANAG,"COMCORR"));
|
||||
_com = cc.get("DENCOM");
|
||||
_prov = cc.get("PROVCOM");
|
||||
if (_cap.empty())
|
||||
_cap = cc.get("CAPCOM");
|
||||
if (_address.full())
|
||||
break;
|
||||
// else fall down
|
||||
}
|
||||
case domfisc:
|
||||
_address = get_field(LF_ANAG,"INDRF");
|
||||
_civ = get_field(LF_ANAG,"CIVRF");
|
||||
_stato = "" ; // look_tab("%STA",get_field(LF_ANAG,"STATORF"));
|
||||
_cap = get_field(LF_ANAG,"CAPRF");
|
||||
look_com(get_field(LF_ANAG,"COMRF"));
|
||||
_loc = "";
|
||||
_com = cc.get("DENCOM");
|
||||
_prov = cc.get("PROVCOM");
|
||||
if (_cap.empty())
|
||||
_cap = cc.get("CAPCOM");
|
||||
if (!_address.empty())
|
||||
break;
|
||||
{
|
||||
_address = get_field(LF_ANAG,"INDRF");
|
||||
_civ = get_field(LF_ANAG,"CIVRF");
|
||||
_stato = "" ; // look_tab("%STA",get_field(LF_ANAG,"STATORF"));
|
||||
_cap = get_field(LF_ANAG,"CAPRF");
|
||||
const TRectype& cc = look_com(get_field(LF_ANAG,"COMRF"));
|
||||
_loc = "";
|
||||
_com = cc.get("DENCOM");
|
||||
_prov = cc.get("PROVCOM");
|
||||
if (_cap.empty())
|
||||
_cap = cc.get("CAPCOM");
|
||||
if (_address.full())
|
||||
break;
|
||||
// else fall down
|
||||
}
|
||||
case residenza:
|
||||
_address = get_field(LF_ANAG,"INDRES");
|
||||
_civ = get_field(LF_ANAG,"CIVRES");
|
||||
_stato = get_field(LF_ANAG,"STATORES");
|
||||
_cap = get_field(LF_ANAG,"CAPRES");
|
||||
look_com(get_field(LF_ANAG,"COMRES"), _stato);
|
||||
_loc = "";
|
||||
_com = cc.get("DENCOM");
|
||||
_prov = cc.get("PROVCOM");
|
||||
if (_cap.empty())
|
||||
_cap = cc.get("CAPCOM");
|
||||
{
|
||||
_address = get_field(LF_ANAG,"INDRES");
|
||||
_civ = get_field(LF_ANAG,"CIVRES");
|
||||
_stato = get_field(LF_ANAG,"STATORES");
|
||||
_cap = get_field(LF_ANAG,"CAPRES");
|
||||
const TRectype& cc = look_com(get_field(LF_ANAG,"COMRES"), _stato);
|
||||
_loc = "";
|
||||
_com = cc.get("DENCOM");
|
||||
_prov = cc.get("PROVCOM");
|
||||
if (_cap.empty())
|
||||
_cap = cc.get("CAPCOM");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -200,7 +200,7 @@ PAGE "Configurazione chiusure mensili" -1 -1 0 0
|
||||
|
||||
STRING F_NUMRIT 4
|
||||
BEGIN
|
||||
PROMPT 2 4 "Numeraz. chiusura mensile "
|
||||
PROMPT 2 4 "Numeraz. ritenuta mensile "
|
||||
FIELD NumRit
|
||||
HELP "Codice numerazione"
|
||||
USE %NUM SELECT I1>5
|
||||
|
@ -383,10 +383,20 @@ bool TConferimenti_query_mask::on_field_event(TOperable_field& o, TField_event e
|
||||
bool confer_codart_handler(TMask_field& f, KEY key)
|
||||
{
|
||||
bool ok = codart_handler(f, key);
|
||||
TMask& row_mask = f.mask();
|
||||
|
||||
if (ok && f.to_check(key))
|
||||
{
|
||||
TMask& row_mask = f.mask();
|
||||
row_mask.set(FR_SCONTO, cfapp().ritprezzo(), true);
|
||||
|
||||
const TString & cod = row_mask.get(FR_CODARTMAG);
|
||||
|
||||
if (cod.full())
|
||||
{
|
||||
const TString & codiva = cache().get(LF_ANAMAG, cod, ANAMAG_CODIVA);
|
||||
if (codiva.full())
|
||||
row_mask.set(FR_CODIVA, codiva);
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
@ -182,8 +182,18 @@ void TImportazioneConf::main_loop()
|
||||
for (int i = 1; i <= m.doc().physical_rows(); i++)
|
||||
{
|
||||
TRiga_documento& r = (*d)[i];
|
||||
|
||||
r.autosave(sh);
|
||||
r.put(RDOC_SCONTO, ritprezzo);
|
||||
|
||||
const TString & cod = r.get(RDOC_CODARTMAG);
|
||||
|
||||
if (cod.full())
|
||||
{
|
||||
const TString & codiva = cache().get(LF_ANAMAG, cod, ANAMAG_CODIVA);
|
||||
if (codiva.full())
|
||||
r.put(RDOC_CODIVA, codiva);
|
||||
}
|
||||
}
|
||||
update_spese_doc(codmercato, *d);
|
||||
d->stato(d->tipo().stato_finale_inserimento());
|
||||
@ -261,7 +271,7 @@ void TImportazioneConf::main_loop()
|
||||
|
||||
}
|
||||
}
|
||||
if (d !=NULL && d->rows() > 0)
|
||||
if (d != NULL && d->rows() > 0)
|
||||
{
|
||||
m.doc() = *d;
|
||||
m.doc2mask();
|
||||
@ -271,8 +281,17 @@ void TImportazioneConf::main_loop()
|
||||
for (int i = 1; i <= m.doc().physical_rows(); i++)
|
||||
{
|
||||
TRiga_documento& r = (*d)[i];
|
||||
|
||||
r.autosave(sh);
|
||||
r.put(RDOC_SCONTO, ritprezzo);
|
||||
const TString & cod = r.get(RDOC_CODARTMAG);
|
||||
|
||||
if (cod.full())
|
||||
{
|
||||
const TString & codiva = cache().get(LF_ANAMAG, cod, ANAMAG_CODIVA);
|
||||
if (codiva.full())
|
||||
r.put(RDOC_CODIVA, codiva);
|
||||
}
|
||||
}
|
||||
update_spese_doc(codmercato, *d);
|
||||
d->stato(d->tipo().stato_finale_inserimento());
|
||||
|
@ -9,7 +9,7 @@ class TFatturazione_cooperative : public TFatturazione_bolle
|
||||
virtual void campi_raggruppamento_righe(TToken_string& campi_riga) const;
|
||||
virtual void campi_raggruppamento(TToken_string& campi) const;
|
||||
virtual bool doc_raggruppabile(const TDocumento & doc) const { return true; }
|
||||
virtual bool doc_raggruppabile(const TDocumento & doc_in, const TDocumento & doc_out, TToken_string & campi) const;
|
||||
virtual bool doc_raggruppabili(const TDocumento & doc_in, const TDocumento & doc_out, TToken_string & campi) const;
|
||||
virtual void add_rows(TRiga_documento & rout, TRiga_documento & rin);
|
||||
virtual void create_row(TDocumento& doc_out, const TRiga_documento & rin);
|
||||
virtual const TString & get_tipo_out(const TDocumento & doc_out);
|
||||
@ -42,25 +42,15 @@ void TFatturazione_cooperative::add_rows(TRiga_documento & rout, TRiga_documento
|
||||
rout.put(RDOC_QTA, qta);
|
||||
}
|
||||
|
||||
bool TFatturazione_cooperative::doc_raggruppabile(const TDocumento & doc_in, const TDocumento & doc_out, TToken_string & campi) const
|
||||
bool TFatturazione_cooperative::doc_raggruppabili(const TDocumento & doc_in, const TDocumento & doc_out, TToken_string & campi) const
|
||||
{
|
||||
if (doc_in.physical_rows() > 0 && doc_out.physical_rows() > 0)
|
||||
{
|
||||
const TRiga_documento & rout = doc_out[1];
|
||||
const TRiga_documento & rin = doc_in[1];
|
||||
const TString art_in = rin.get(RDOC_CODART);
|
||||
const TString art_out = rout.get(RDOC_CODART);
|
||||
bool raggruppa = art_in == art_out;
|
||||
|
||||
if (raggruppa)
|
||||
{
|
||||
const TString & art = rin.get(RDOC_CODARTMAG);
|
||||
const TString & iva_in = cache().get(LF_ANAMAG, art, ANAMAG_USER4);
|
||||
const TString iva_out = rout.get(RDOC_CODIVA);
|
||||
|
||||
raggruppa = iva_in == iva_out;
|
||||
}
|
||||
return raggruppa;
|
||||
const TString80 art_in = rin.get(RDOC_CODART);
|
||||
const TString80 art_out = rout.get(RDOC_CODART);
|
||||
return art_in == art_out;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -289,6 +289,7 @@ bool TMovCoop_recset::move_to(TRecnotype pos)
|
||||
|
||||
if (ok)
|
||||
{
|
||||
TToken_string key;
|
||||
TDocumento d(cursor()->curr());
|
||||
|
||||
_codditta = d.get_long(DOC_CODCF);
|
||||
@ -308,13 +309,27 @@ bool TMovCoop_recset::move_to(TRecnotype pos)
|
||||
|
||||
if (row > 0)
|
||||
{
|
||||
const TRiga_documento & r = d[row];
|
||||
TRiga_documento & r = d[row];
|
||||
const TRectype & anamag = cache().get(LF_ANAMAG, r.get(RDOC_CODARTMAG));
|
||||
const TString & tipodoc = anamag.get(ANAMAG_USER3);
|
||||
|
||||
TCodiceIVA iva(r.get(RDOC_CODIVA));
|
||||
|
||||
if (iva.get_int("S4") == 0)
|
||||
if (iva.get_int("S4") == 0 && _codditta < 1000)
|
||||
_codditta += 1000;
|
||||
|
||||
key = "F";
|
||||
key.add(_codditta % 1000);
|
||||
const TRectype & socio = cache().get(LF_CFVEN, key);
|
||||
|
||||
if (socio.get_bool(CFV_IVARID))
|
||||
{
|
||||
const TString4 ci = anamag.get(ANAMAG_CODIVAR);
|
||||
|
||||
if (ci.full())
|
||||
r.put(RDOC_CODIVA, ci);
|
||||
}
|
||||
|
||||
if (tipodoc.full())
|
||||
{
|
||||
d.put(DOC_CODNUM, tipodoc);
|
||||
|
@ -3,18 +3,18 @@
|
||||
<description>Stampa Saldi Estratto Conto</description>
|
||||
<font face="Courier New" size="8" />
|
||||
<section type="Head">
|
||||
<field x="58" type="Testo" align="right" width="15" pattern="1" text="Nr. cF;corrente">
|
||||
<field x="20.7" type="Testo" width="27" pattern="1" text="IBAN">
|
||||
<source>101.NUMCC</source>
|
||||
</field>
|
||||
<field x="75" type="Testo" align="right" width="17" pattern="1" text="Saldo a credito" />
|
||||
<field x="94" type="Testo" align="right" width="17" pattern="1" text="Saldo a debito">
|
||||
<field x="79" type="Testo" align="right" width="15" pattern="1" text="Saldo a credito" />
|
||||
<field x="95" type="Testo" align="right" width="15" pattern="1" text="Saldo a debito">
|
||||
<source>Saldo a debito</source>
|
||||
</field>
|
||||
<field x="113" type="Testo" width="50" pattern="1" text="Banca F; dipendenza">
|
||||
<source>102.S0</source>
|
||||
</field>
|
||||
<field border="2" y="1" type="Linea" width="170" height="0" pattern="1" />
|
||||
<field x="2" type="Testo" width="54" id="101" pattern="1" text="Socio">
|
||||
<field x="1" type="Testo" width="10" id="101" pattern="1" text="Socio">
|
||||
<source>101.CODCF</source>
|
||||
</field>
|
||||
</section>
|
||||
@ -48,23 +48,23 @@ MESSAGE RESET,F2.105</prescript>
|
||||
</section>
|
||||
<section type="Body" />
|
||||
<section type="Body" level="1" hidden="1">
|
||||
<field x="2" type="Numero" align="right" width="3" id="101" pattern="1">
|
||||
<field x="0.5" type="Numero" align="right" width="3" id="101" pattern="1">
|
||||
<source>DOC.CODCF</source>
|
||||
<prescript description="B1.101 PRESCRIPT">#THIS @ \ leggo il valore attuale
|
||||
"F2.101" ! \ lo scrivo nel riepilogo</prescript>
|
||||
</field>
|
||||
<field x="6" type="Stringa" dynamic_height="1" width="25" height="2" id="102" pattern="1">
|
||||
<field x="4" type="Stringa" dynamic_height="1" width="25" height="2" id="102" pattern="1">
|
||||
<source>TRIM(CLIFO.RAGSOC[1,30])+" "+TRIM(CLIFO.RAGSOC[31,50])</source>
|
||||
<prescript description="B1.102 PRESCRIPT">#THIS @
|
||||
"F2.102" !</prescript>
|
||||
</field>
|
||||
<field x="34" type="Stringa" align="right" width="15" id="103" pattern="1">
|
||||
<field x="26" y="1" type="Stringa" align="right" width="28.5" id="103" pattern="1">
|
||||
<source>CLIFO.IBAN</source>
|
||||
<alt_source>CLIFO.NUMCC</alt_source>
|
||||
<prescript description="B1.103 PRESCRIPT">#THIS @
|
||||
"F2.103" !</prescript>
|
||||
</field>
|
||||
<field x="52" type="Valuta" align="right" width="15" id="104" pattern="1" text="###.###.###,@@">
|
||||
<field x="54" type="Valuta" align="right" width="15" id="104" pattern="1" text="###.###.###,@@">
|
||||
<prescript description="B1.104 PRESCRIPT">"DOC.TIPODOC" @ \ leggo il tipo documento
|
||||
"CONF" = IF \ controllo se &#E8; un conferimento
|
||||
"DOC.NETCRED" @
|
||||
@ -76,7 +76,7 @@ ELSE \ se non &#E8; un conferimento
|
||||
THEN
|
||||
+! \ lo sommo</prescript>
|
||||
</field>
|
||||
<field x="52" y="1" type="Valuta" align="right" width="15" id="105" pattern="1" text="###.###.###,@@">
|
||||
<field x="54" y="1" type="Valuta" align="right" width="15" id="105" pattern="1" text="###.###.###,@@">
|
||||
<prescript description="B1.105 PRESCRIPT">"DOC.TOTRITACC" @
|
||||
"F2.104" \ lo metto nella coda del gruppo
|
||||
+! \ lo sommo</prescript>
|
||||
@ -91,14 +91,14 @@ THEN
|
||||
<section type="Foot" level="1">
|
||||
<field border="2" y="1" type="Linea" width="170" height="0" pattern="1" />
|
||||
<field x="55" y="2" type="Testo" width="15" pattern="1" text="TOTALI" />
|
||||
<field x="75" y="2" type="Valuta" align="right" width="17" id="101" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
||||
<field x="94" y="2" type="Valuta" align="right" width="17" id="102" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
||||
<field x="79" y="2" type="Valuta" align="right" width="15" id="101" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
||||
<field x="95" y="2" type="Valuta" align="right" width="15" id="102" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
||||
</section>
|
||||
<section type="Foot" level="2">
|
||||
<field x="3" type="Numero" align="right" width="3" id="101" pattern="1" />
|
||||
<field x="7" type="Stringa" width="49" id="102" pattern="1" />
|
||||
<field x="58" type="Stringa" align="right" width="15" id="103" pattern="1" />
|
||||
<field x="75" type="Valuta" align="right" width="17" id="104" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||
<field x="0.5" type="Numero" align="right" width="3" id="101" pattern="1" />
|
||||
<field x="4" type="Stringa" width="46" id="102" pattern="1" />
|
||||
<field x="50.7" type="Stringa" align="right" width="28.2" id="103" pattern="1" />
|
||||
<field x="79" type="Valuta" align="right" width="15" id="104" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||
<prescript description="F2.104 PRESCRIPT">#THIS @ \ leggo il valore attuale
|
||||
DUP \ lo duplico
|
||||
0 E;= IF \ se &#E8; maggiore di zero
|
||||
@ -110,7 +110,7 @@ ELSE
|
||||
THEN</prescript>
|
||||
<postscript description="F2.104 POSTSCRIPT">MESSAGE ADD,F1.101</postscript>
|
||||
</field>
|
||||
<field x="94" type="Valuta" align="right" width="17" id="105" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||
<field x="95" type="Valuta" align="right" width="15" id="105" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||
<postscript description="F2.105 POSTSCRIPT">MESSAGE ADD,F1.102</postscript>
|
||||
</field>
|
||||
<field x="113" type="Stringa" width="70" id="106" pattern="1" />
|
||||
|
@ -3,18 +3,18 @@
|
||||
<description>Stampa Saldi Estratto Conto per Banca</description>
|
||||
<font face="Courier New" size="8" />
|
||||
<section type="Head">
|
||||
<field x="58" type="Testo" align="right" width="15" pattern="1" text="Nr. cF;corrente">
|
||||
<field x="50.2" type="Testo" width="15" pattern="1" text="IBAN">
|
||||
<source>101.NUMCC</source>
|
||||
</field>
|
||||
<field x="75" type="Testo" align="right" width="17" pattern="1" text="Saldo a credito" />
|
||||
<field x="94" type="Testo" align="right" width="17" pattern="1" text="Saldo a debito">
|
||||
<field x="79" type="Testo" align="right" width="15" pattern="1" text="Saldo a credito" />
|
||||
<field x="95" type="Testo" align="right" width="12" pattern="1" text="Saldo a debito">
|
||||
<source>Saldo a debito</source>
|
||||
</field>
|
||||
<field x="112" type="Testo" width="50" pattern="1" text="Banca F; dipendenza">
|
||||
<source>102.S0</source>
|
||||
</field>
|
||||
<field border="2" y="1" type="Linea" width="170" height="0" pattern="1" />
|
||||
<field x="2" type="Testo" width="54" id="101" pattern="1" text="Socio">
|
||||
<field x="1.5" type="Testo" width="54" id="101" pattern="1" text="Socio">
|
||||
<source>101.CODCF</source>
|
||||
</field>
|
||||
</section>
|
||||
@ -71,7 +71,7 @@ MESSAGE RESET,F3.105</prescript>
|
||||
<prescript description="B1.102 PRESCRIPT">#THIS @
|
||||
"F3.102" !</prescript>
|
||||
</field>
|
||||
<field x="35.5" type="Stringa" align="right" width="15" id="103" pattern="1">
|
||||
<field x="35.5" type="Stringa" align="right" dynamic_height="1" width="15" height="2" id="103" pattern="1">
|
||||
<source>CLIFO.IBAN</source>
|
||||
<alt_source>CLIFO.NUMCC</alt_source>
|
||||
<prescript description="B1.103 PRESCRIPT">#THIS @
|
||||
@ -100,14 +100,14 @@ THEN
|
||||
<section type="Foot" level="2">
|
||||
<field border="2" x="-0.04" y="0.25" type="Linea" width="170" height="0" pattern="1" />
|
||||
<field x="54.96" y="1.25" type="Testo" width="15" pattern="1" text="TOTALE" />
|
||||
<field x="75" y="1.25" type="Valuta" align="right" width="17" id="101" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
||||
<field x="94" y="1.25" type="Valuta" align="right" width="17" id="102" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
||||
<field x="79" y="1.25" type="Valuta" align="right" width="15" id="101" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
||||
<field x="95" y="1.25" type="Valuta" align="right" width="15" id="102" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
||||
</section>
|
||||
<section type="Foot" level="3">
|
||||
<field x="0.75" y="-0.13" type="Numero" align="right" width="3" id="101" pattern="1" />
|
||||
<field x="4.75" y="-0.13" type="Stringa" width="49" id="102" pattern="1" />
|
||||
<field x="55.75" y="-0.13" type="Stringa" align="right" width="15" id="103" pattern="1" />
|
||||
<field x="75" y="-0.13" type="Valuta" align="right" width="17" id="104" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||
<field x="0.5" type="Numero" align="right" width="3" id="101" pattern="1" />
|
||||
<field x="4" type="Stringa" width="46" id="102" pattern="1" />
|
||||
<field x="50.2" type="Stringa" align="right" width="28.2" id="103" pattern="1" />
|
||||
<field x="79" type="Valuta" align="right" width="15" id="104" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||
<prescript description="F3.104 PRESCRIPT">#THIS @ \ leggo il valore attuale
|
||||
DUP \ lo duplico
|
||||
0 E;= IF \ se &#E8; maggiore di zero
|
||||
@ -119,7 +119,7 @@ ELSE
|
||||
THEN</prescript>
|
||||
<postscript description="F3.104 POSTSCRIPT">MESSAGE ADD,F2.101</postscript>
|
||||
</field>
|
||||
<field x="94" y="-0.13" type="Valuta" align="right" width="17" id="105" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||
<field x="95" type="Valuta" align="right" width="15" id="105" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||
<postscript description="F3.105 POSTSCRIPT">MESSAGE ADD,F2.102</postscript>
|
||||
</field>
|
||||
<field x="112" y="-0.13" type="Stringa" width="50" id="106" pattern="1" />
|
||||
|
@ -80,6 +80,8 @@
|
||||
#define DOC_NUMREG "NUMREG"
|
||||
#define DOC_NUMANT "NUMANT"
|
||||
#define DOC_NUMREGCA "NUMREGCA"
|
||||
#define DOC_TIPOCFFATT "TIPOCFFATT"
|
||||
#define DOC_CODCFFATT "CODCFFATT"
|
||||
|
||||
// Virtuali
|
||||
|
||||
|
@ -1984,8 +1984,8 @@ void TSpreadsheet::on_idle()
|
||||
{
|
||||
const int next_row = _selection_posted;
|
||||
_selection_posted = -1;
|
||||
if (next_row == _cur_rec)
|
||||
return ;
|
||||
// if (next_row == _cur_rec)
|
||||
// return ;
|
||||
if (next_row < items())
|
||||
select(next_row, 1, FALSE);
|
||||
}
|
||||
|
@ -527,13 +527,24 @@ TIsamtempfile * TStampa_inventario::calcola_giacenze(const bool giaceff, const b
|
||||
ordine = 2;
|
||||
}
|
||||
|
||||
else
|
||||
if (subordine == 'M' || subordine == 'S')
|
||||
{
|
||||
TString8 m1 = m.get(F_DACATMER); if (m1.not_empty()) m1.left_just(3);
|
||||
TString8 m2 = m.get(F_ACATMER); if (m2.not_empty()) m2.left_just(3);
|
||||
ordine = 3;
|
||||
|
||||
if (subordine == 'S')
|
||||
{
|
||||
m1 << m.get(F_DASCATMER);
|
||||
m2 << m.get(F_ASCATMER);
|
||||
}
|
||||
darec.put(ANAMAG_GRMERC, m1);
|
||||
arec.put(ANAMAG_GRMERC, m2);
|
||||
}
|
||||
|
||||
TRelation ana_rel(LF_ANAMAG);
|
||||
TCursor ana_cur(&ana_rel, "", ordine, &darec, &arec);
|
||||
// fino qui
|
||||
|
||||
//TRelation ana_rel(LF_ANAMAG);
|
||||
//TCursor ana_cur(&ana_rel, "", 1, &darec, &arec);
|
||||
|
||||
const TRecnotype items = ana_cur.items();
|
||||
|
||||
ana_cur.freeze();
|
||||
|
@ -208,6 +208,7 @@ BEGIN
|
||||
GROUP 1
|
||||
MESSAGE EMPTY CLEAR,2@|K_TAB,FD_CODPAG02
|
||||
MESSAGE ENABLE,2@
|
||||
ADD RUN ba3 -6
|
||||
END
|
||||
|
||||
STRING FD_LABPAG01 30
|
||||
@ -246,6 +247,7 @@ BEGIN
|
||||
GROUP 2
|
||||
MESSAGE EMPTY CLEAR,3@|K_TAB,FD_CODPAG03
|
||||
MESSAGE ENABLE,3@
|
||||
ADD RUN ba3 -6
|
||||
END
|
||||
|
||||
STRING FD_LABPAG02 30
|
||||
@ -286,6 +288,7 @@ BEGIN
|
||||
GROUP 3
|
||||
MESSAGE EMPTY CLEAR,4@|K_TAB,FD_CODPAG04
|
||||
MESSAGE ENABLE,4@
|
||||
ADD RUN ba3 -6
|
||||
END
|
||||
|
||||
STRING FD_LABPAG03 30
|
||||
@ -326,7 +329,7 @@ BEGIN
|
||||
GROUP 4
|
||||
MESSAGE EMPTY CLEAR,5@|K_TAB,FD_CODPAG05
|
||||
MESSAGE ENABLE,5@
|
||||
|
||||
ADD RUN ba3 -6
|
||||
END
|
||||
|
||||
STRING FD_LABPAG04 30
|
||||
@ -367,6 +370,7 @@ BEGIN
|
||||
GROUP 5
|
||||
MESSAGE EMPTY CLEAR,6@|K_TAB,FD_CODPAG06
|
||||
MESSAGE ENABLE,6@
|
||||
ADD RUN ba3 -6
|
||||
END
|
||||
|
||||
STRING FD_LABPAG05 30
|
||||
@ -407,7 +411,7 @@ BEGIN
|
||||
GROUP 6
|
||||
MESSAGE EMPTY CLEAR,7@|K_TAB,FD_CODPAG07
|
||||
MESSAGE ENABLE,7@
|
||||
|
||||
ADD RUN ba3 -6
|
||||
END
|
||||
|
||||
STRING FD_LABPAG06 30
|
||||
@ -448,6 +452,7 @@ BEGIN
|
||||
GROUP 7
|
||||
MESSAGE EMPTY CLEAR,8@|K_TAB,FD_CODPAG08
|
||||
MESSAGE ENABLE,8@
|
||||
ADD RUN ba3 -6
|
||||
END
|
||||
|
||||
STRING FD_LABPAG07 30
|
||||
@ -486,6 +491,7 @@ BEGIN
|
||||
CHECKTYPE NORMAL
|
||||
FLAGS "DG"
|
||||
GROUP 8
|
||||
ADD RUN ba3 -6
|
||||
END
|
||||
|
||||
STRING FD_LABPAG08 30
|
||||
|
@ -915,6 +915,7 @@ bool TReport_doc_app::get_next_mail(TToken_string& to, TToken_string& cc, TToken
|
||||
if (subj.blank())
|
||||
subj = doc.tipo().descrizione();
|
||||
text << "Invio documento " << subj;
|
||||
ui = false;
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
|
@ -1055,16 +1055,23 @@ bool TMask_anamag::notify_sheet_cod(TSheet_field & s, int r, KEY k)
|
||||
switch (k)
|
||||
{
|
||||
case K_CTRL + K_INS:
|
||||
if (s.items() == 1) // Genero la prima riga in base ai parametri dei codici alternativi
|
||||
{
|
||||
TMask_anamag& mask = (TMask_anamag&)s.mask();
|
||||
if (mask._altype_cod > 0 && mask.generate_code(mask._altype_cod))
|
||||
{
|
||||
TToken_string& row = s.row(0);
|
||||
row = mask.generated_code();
|
||||
row.add(mask._altype_cod);
|
||||
}
|
||||
}
|
||||
{
|
||||
TMask_anamag& mask = (TMask_anamag&)s.mask();
|
||||
|
||||
if (s.items() == 1) // Genero la prima riga in base ai parametri dei codici alternativi
|
||||
{
|
||||
if (mask._altype_cod > 0 && mask.generate_code(mask._altype_cod))
|
||||
{
|
||||
TToken_string& row = s.row(0);
|
||||
row = mask.generated_code();
|
||||
row.add(mask._altype_cod);
|
||||
}
|
||||
}
|
||||
TToken_string & rw = s.row(r);
|
||||
TSheet_field & um = mask.sfield(F_SHEETUM);
|
||||
if (um.items() > 0)
|
||||
rw.add(um.row(0).get(s.cid2index(FS_CODUM)), s.cid2index(FS_CODUMCORR));
|
||||
}
|
||||
break;
|
||||
case K_ENTER:
|
||||
{
|
||||
|
@ -239,6 +239,8 @@ public:
|
||||
class TFatturazione_bolle : public TElaborazione // velib04a
|
||||
{
|
||||
TToken_string _cod_desc;
|
||||
bool _cambia_codice;
|
||||
TToken_string _lista_campi;
|
||||
|
||||
protected:
|
||||
virtual void campi_raggruppamento_righe(TToken_string& campi_riga) const;
|
||||
|
@ -10,6 +10,10 @@
|
||||
TFatturazione_bolle::TFatturazione_bolle(const char* cod)
|
||||
: TElaborazione(cod)
|
||||
{
|
||||
TConfig c(CONFIG_DITTA, "ve");
|
||||
TString16 name; name.format("AGGFLD(%s)", cod);
|
||||
|
||||
_lista_campi = c.get(name);
|
||||
}
|
||||
|
||||
void TFatturazione_bolle::tipi_validi(TToken_string& tipi) const
|
||||
@ -294,14 +298,96 @@ bool TFatturazione_bolle::elabora(TLista_documenti& doc_in, TLista_documenti& do
|
||||
TWait_cursor hourglass;
|
||||
TToken_string campi_doc(128); // Lista di campi che devono essere uguali
|
||||
TBit_array closed;
|
||||
|
||||
|
||||
|
||||
campi_raggruppamento(campi_doc);
|
||||
|
||||
pre_process_input(doc_in);
|
||||
for (int id = 0; id < doc_in.items(); id++)
|
||||
{
|
||||
TDocumento& campione = doc_in[id];
|
||||
const TString8 orig_t(campione.get(DOC_TIPOCF));
|
||||
const long orig_cod = campione.get_long(DOC_CODCF);
|
||||
|
||||
if (get_bool("B13"))
|
||||
{
|
||||
const TString4 t(campione.get(DOC_TIPOCFFATT));
|
||||
const long codcf = campione.get_long(DOC_CODCFFATT);
|
||||
|
||||
if (t.full())
|
||||
{
|
||||
campione.put(DOC_TIPOCF, t);
|
||||
if (interattivo)
|
||||
doc_out[0].put(DOC_TIPOCF, t);
|
||||
}
|
||||
if (codcf > 0L)
|
||||
{
|
||||
campione.put(DOC_CODCF, codcf);
|
||||
if (interattivo)
|
||||
doc_out[0].put(DOC_CODCF, codcf);
|
||||
}
|
||||
}
|
||||
if (_lista_campi.full())
|
||||
{
|
||||
TToken_string s("", '=');
|
||||
for (s = _lista_campi.get(0); s.full(); s = _lista_campi.get())
|
||||
{
|
||||
TString16 oname(s.get());
|
||||
TString16 iname(s.get());
|
||||
|
||||
if (oname == RDOC_CODIVA)
|
||||
{
|
||||
const int rows = campione.physical_rows();
|
||||
const TString8 codesiva = campione.codesiva();
|
||||
|
||||
for (int i = 1; i <= rows; i++)
|
||||
{
|
||||
TRiga_documento & rdoc = campione[i];
|
||||
|
||||
if (codesiva.full())
|
||||
rdoc.put(RDOC_CODIVA, codesiva);
|
||||
else
|
||||
{
|
||||
if (rdoc.is_articolo())
|
||||
{
|
||||
const TArticolo_giacenza * art = rdoc.articolo();
|
||||
|
||||
if (art != NULL)
|
||||
{
|
||||
const TString8 codiva = art->get(ANAMAG_CODIVA);
|
||||
|
||||
if (codiva.full())
|
||||
rdoc.put(RDOC_CODIVA, codiva);
|
||||
}
|
||||
}
|
||||
else
|
||||
if (rdoc.is_spese() || rdoc.is_prestazione())
|
||||
{
|
||||
const TSpesa_prest & s = rdoc.spesa();
|
||||
const TString8 codiva = s.cod_iva();
|
||||
|
||||
if (codiva.full())
|
||||
rdoc.put(RDOC_CODIVA, codiva);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
campione.set_riga_esenzione();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (iname.blank())
|
||||
iname = oname;
|
||||
if (iname.starts_with("17."))
|
||||
campione.put(oname, campione.clifor().vendite().get(iname.mid(3)));
|
||||
else
|
||||
if (iname.starts_with("CFVEN."))
|
||||
campione.put(oname, campione.clifor().vendite().get(iname.mid(6)));
|
||||
else
|
||||
campione.put(oname, campione.clifor().get(iname));
|
||||
}
|
||||
}
|
||||
}
|
||||
const int tot = doc_out.items();
|
||||
int od = tot;
|
||||
|
||||
@ -359,8 +445,15 @@ bool TFatturazione_bolle::elabora(TLista_documenti& doc_in, TLista_documenti& do
|
||||
od = doc_out.add(new_doc);
|
||||
}
|
||||
|
||||
if (get_bool("B13"))
|
||||
{
|
||||
campione.put(DOC_TIPOCF, orig_t);
|
||||
campione.put(DOC_CODCF, orig_cod);
|
||||
}
|
||||
if (!raggruppa(campione, doc_out[od]) && doc_out[od].physical_rows() == 0)
|
||||
doc_out.destroy(od);
|
||||
else
|
||||
doc_out[od].set_riga_esenzione();
|
||||
|
||||
campione.flush_rows();
|
||||
}
|
||||
|
@ -316,8 +316,13 @@ long TGenerazione_effetti::group_bills(TAssoc_array& group_array)
|
||||
const real change = doc.cambio();
|
||||
const TDate datafatt = doc.get_date(DOC_DATADOC);
|
||||
const bool is_nota_credito = doc.is_nota_credito();
|
||||
const long numdocrif = doc.get_long(DOC_NUMDOCRIF);
|
||||
const int annodocrif = doc.get_date(DOC_DATADOCRIF).year();
|
||||
long numdocrif = doc.get_long(DOC_NUMDOCRIF);
|
||||
int annodocrif = doc.get_date(DOC_DATADOCRIF).year();
|
||||
if (numdocrif > 0L && doc.get_char(DOC_TIPOCF) == 'C' && !doc.tipo().nota_credito())
|
||||
{
|
||||
annodocrif = 0;
|
||||
numdocrif = 0L;
|
||||
}
|
||||
|
||||
// Qui il controllo sul residuo da pagare per il documento corrente non va effettuato,
|
||||
// proprio perchè si sta effettuando un raggruppamento di effetti; eventuali documenti
|
||||
@ -649,8 +654,11 @@ void TGenerazione_effetti::generate_bill(TDocumento& doc) // bill in inglese sig
|
||||
reffetto.put(REFF_ANNODOC,anno);
|
||||
reffetto.put(REFF_CODNUM,codnum);
|
||||
reffetto.put(REFF_NFATT,nfatt);
|
||||
reffetto.put(REFF_ANNO, doc.get_date(DOC_DATADOCRIF).year());
|
||||
reffetto.put(REFF_NUMPART, doc.get(DOC_NUMDOCRIF));
|
||||
if (doc.get_char(DOC_TIPOCF) == 'F' || doc.tipo().nota_credito())
|
||||
{
|
||||
reffetto.put(REFF_ANNO, doc.get_date(DOC_DATADOCRIF).year());
|
||||
reffetto.put(REFF_NUMPART, doc.get(DOC_NUMDOCRIF));
|
||||
}
|
||||
|
||||
importo = pag.importo_rata(i,FALSE);
|
||||
effetto.put(EFF_IMPORTO,importo);
|
||||
|
@ -51,6 +51,8 @@
|
||||
#define F_SCARTI 172
|
||||
#define F_NETTIFICA 173
|
||||
#define F_RELOAD_PRICES 174
|
||||
#define F_CHGCF 175
|
||||
|
||||
|
||||
#define H_DOC1 180
|
||||
#define H_DOC2 181
|
||||
@ -81,6 +83,7 @@
|
||||
#define F_COMMESSA 333
|
||||
|
||||
#define F_PREZZO_DA_ORDINE 340
|
||||
#define F_AGGIORNA_PREZZO 341
|
||||
|
||||
#define F_QTACON 345
|
||||
#define F_QTAEV 346
|
||||
|
@ -549,9 +549,16 @@ BEGIN
|
||||
FIELD B6
|
||||
END
|
||||
|
||||
BOOLEAN F_CHGCF
|
||||
BEGIN
|
||||
PROMPT 2 19 "Aggiorna il codice cliente/fornitore"
|
||||
FIELD B13
|
||||
GROUP 2
|
||||
END
|
||||
|
||||
STRING F_APPLICAZIONE 70 50
|
||||
BEGIN
|
||||
PROMPT 2 19 "Applicazione "
|
||||
PROMPT 2 20 "Applicazione "
|
||||
FIELD S3
|
||||
GROUP 9
|
||||
END
|
||||
@ -686,6 +693,16 @@ BOOLEAN F_PREZZO_DA_ORDINE
|
||||
BEGIN
|
||||
PROMPT 28 12 "Ricava prezzo e sconto da ordine"
|
||||
FIELD B5
|
||||
FLAGS "H"
|
||||
GROUP 2
|
||||
END
|
||||
|
||||
BOOLEAN F_AGGIORNA_PREZZO
|
||||
BEGIN
|
||||
PROMPT 28 12 "Aggiorna prezzi"
|
||||
FIELD B5
|
||||
FLAGS "H"
|
||||
GROUP 1
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 78 5
|
||||
|
@ -58,7 +58,7 @@ BEGIN
|
||||
ITEM "3|Ordine" MESSAGE CLEAR,2@|ENABLE,F_LORDO
|
||||
ITEM "4|Scontrino" MESSAGE ENABLE,2@|DISABLE,F_LORDO|"X",F_LORDO
|
||||
ITEM "5|Conferimento soci" MESSAGE CLEAR,2@
|
||||
ITEM "6|Prestazioni ai soci" MESSAGE CLEAR,2@
|
||||
ITEM "6|Prestazioni ai soci" MESSAGE ENABLE,2@
|
||||
END
|
||||
|
||||
STRING F_PROFILO 8
|
||||
|
@ -4,7 +4,7 @@
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 2001-08-21
|
||||
// RCS-ID: $Id: email.cpp,v 1.4 2009-02-23 11:44:41 guy Exp $
|
||||
// RCS-ID: $Id: email.cpp,v 1.5 2009-03-23 10:37:33 alex Exp $
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@ -55,10 +55,8 @@ bool wxEmail::Send(wxMailMessage& message, const wxString& profileName, bool bUI
|
||||
return session.Send(message, bUI);
|
||||
}
|
||||
#elif defined(__UNIX__)
|
||||
bool
|
||||
wxEmail::Send(wxMailMessage& message,
|
||||
const wxString& profileName,
|
||||
const wxString& sendMail)
|
||||
bool wxEmail::Send(wxMailMessage& message, const wxString& profileName,
|
||||
bool bUI, const wxString& sendMail)
|
||||
{
|
||||
wxASSERT_MSG( !message.m_to.IsEmpty(), _T("no recipients to send mail to") ) ;
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
// Author: PJ Naughter <pjna@naughter.com>
|
||||
// Modified by: Julian Smart
|
||||
// Created: 2001-08-21
|
||||
// RCS-ID: $Id: smapi.cpp,v 1.3 2009-02-23 11:44:41 guy Exp $
|
||||
// RCS-ID: $Id: smapi.cpp,v 1.4 2009-03-23 10:37:33 alex Exp $
|
||||
// Copyright: (c) PJ Naughter
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@ -89,7 +89,7 @@ void wxMapiSession::Initialise()
|
||||
{
|
||||
//First make sure the "WIN.INI" entry for MAPI is present aswell
|
||||
//as the MAPI32 dll being present on the system
|
||||
bool bMapiInstalled = (GetProfileInt(_T("MAIL"), _T("MAPI"), 0) != 0) &&
|
||||
bool bMapiInstalled = (::GetProfileInt(_T("MAIL"), _T("MAPI"), 0) != 0) &&
|
||||
(SearchPath(NULL, _T("MAPI32.DLL"), NULL, 0, NULL, NULL) != 0);
|
||||
|
||||
if (bMapiInstalled)
|
||||
@ -117,7 +117,9 @@ void wxMapiSession::Initialise()
|
||||
}
|
||||
}
|
||||
else
|
||||
wxLogDebug(_T("Mapi is not installed on this computer\n"));
|
||||
{
|
||||
wxMessageBox("Mapi is not installed on this computer", "MAPIInitialise", wxOK|wxCENTRE|wxICON_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
void wxMapiSession::Deinitialise()
|
||||
@ -461,7 +463,9 @@ bool wxMapiSession::Send(wxMailMessage& message, bool show_ui)
|
||||
}
|
||||
else
|
||||
{
|
||||
wxLogDebug(_T("Failed to send mail message, Error:%ld\n"), nError);
|
||||
wxString msg = "Impossibile inviare il messaggio: Errore ";
|
||||
msg << nError;
|
||||
wxMessageBox(msg, "MAPISendMail", wxOK|wxCENTRE|wxICON_ERROR);
|
||||
m_data->m_nLastError = nError;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user