diff --git a/ba/ba6100.cpp b/ba/ba6100.cpp
index 8ad38be53..3269e8e4b 100755
--- a/ba/ba6100.cpp
+++ b/ba/ba6100.cpp
@@ -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;
}
}
diff --git a/co/co0300a.uml b/co/co0300a.uml
index 12b58363f..524a545a1 100755
--- a/co/co0300a.uml
+++ b/co/co0300a.uml
@@ -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
diff --git a/co/co0700.cpp b/co/co0700.cpp
index 5908544f2..85b1fb481 100755
--- a/co/co0700.cpp
+++ b/co/co0700.cpp
@@ -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;
}
diff --git a/co/co0800.cpp b/co/co0800.cpp
index 12b374735..9cf4fad14 100755
--- a/co/co0800.cpp
+++ b/co/co0800.cpp
@@ -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());
diff --git a/co/co1400.cpp b/co/co1400.cpp
index 34393972d..2d107fb30 100755
--- a/co/co1400.cpp
+++ b/co/co1400.cpp
@@ -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;
}
diff --git a/co/co1500.cpp b/co/co1500.cpp
index 7878df9ca..bb985c0af 100755
--- a/co/co1500.cpp
+++ b/co/co1500.cpp
@@ -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);
diff --git a/co/co1600a.rep b/co/co1600a.rep
index 9dbe7ee2b..dee19a940 100755
--- a/co/co1600a.rep
+++ b/co/co1600a.rep
@@ -3,18 +3,18 @@
Stampa Saldi Estratto Conto
-
+
101.NUMCC
-
-
+
+
Saldo a debito
102.S0
-
+
101.CODCF
@@ -48,23 +48,23 @@ MESSAGE RESET,F2.105
-
+
DOC.CODCF
#THIS @ \ leggo il valore attuale
"F2.101" ! \ lo scrivo nel riepilogo
-
+
TRIM(CLIFO.RAGSOC[1,30])+" "+TRIM(CLIFO.RAGSOC[31,50])
#THIS @
"F2.102" !
-
+
CLIFO.IBAN
CLIFO.NUMCC
#THIS @
"F2.103" !
-
+
"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
-
+
"DOC.TOTRITACC" @
"F2.104" \ lo metto nella coda del gruppo
+! \ lo sommo
@@ -91,14 +91,14 @@ THEN
-
-
-
-
+
+
+
+
#THIS @ \ leggo il valore attuale
DUP \ lo duplico
0 E;= IF \ se E8; maggiore di zero
@@ -110,7 +110,7 @@ ELSE
THEN
MESSAGE ADD,F1.101
-
+
MESSAGE ADD,F1.102
diff --git a/co/co1700a.rep b/co/co1700a.rep
index 1d38642d1..0a8ce2493 100755
--- a/co/co1700a.rep
+++ b/co/co1700a.rep
@@ -3,18 +3,18 @@
Stampa Saldi Estratto Conto per Banca
-
+
101.NUMCC
-
-
+
+
Saldo a debito
102.S0
-
+
101.CODCF
@@ -71,7 +71,7 @@ MESSAGE RESET,F3.105
#THIS @
"F3.102" !
-
+
CLIFO.IBAN
CLIFO.NUMCC
#THIS @
@@ -100,14 +100,14 @@ THEN
-
-
-
-
+
+
+
+
#THIS @ \ leggo il valore attuale
DUP \ lo duplico
0 E;= IF \ se E8; maggiore di zero
@@ -119,7 +119,7 @@ ELSE
THEN
MESSAGE ADD,F2.101
-
+
MESSAGE ADD,F2.102
diff --git a/include/doc.h b/include/doc.h
index f5a0aeba0..f182094f7 100755
--- a/include/doc.h
+++ b/include/doc.h
@@ -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
diff --git a/include/msksheet.cpp b/include/msksheet.cpp
index 94ac3653f..b6112ba80 100755
--- a/include/msksheet.cpp
+++ b/include/msksheet.cpp
@@ -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);
}
diff --git a/mg/mg4200.cpp b/mg/mg4200.cpp
index 6ed7879df..8f5028153 100755
--- a/mg/mg4200.cpp
+++ b/mg/mg4200.cpp
@@ -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();
diff --git a/vd/vd0300a.uml b/vd/vd0300a.uml
index 2f47bcd9a..69cfeef99 100755
--- a/vd/vd0300a.uml
+++ b/vd/vd0300a.uml
@@ -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
diff --git a/ve/ve1300.cpp b/ve/ve1300.cpp
index 3844f8be9..13b32b706 100755
--- a/ve/ve1300.cpp
+++ b/ve/ve1300.cpp
@@ -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;
diff --git a/ve/ve2400.cpp b/ve/ve2400.cpp
index 275bdf7f9..9e70768c9 100755
--- a/ve/ve2400.cpp
+++ b/ve/ve2400.cpp
@@ -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:
{
diff --git a/ve/velib04.h b/ve/velib04.h
index 781cc12ba..8815682c4 100755
--- a/ve/velib04.h
+++ b/ve/velib04.h
@@ -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;
diff --git a/ve/velib04a.cpp b/ve/velib04a.cpp
index 570ec8168..ba5aefae1 100755
--- a/ve/velib04a.cpp
+++ b/ve/velib04a.cpp
@@ -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();
}
diff --git a/ve/velib04c.cpp b/ve/velib04c.cpp
index 69a23bcb0..5f113635c 100755
--- a/ve/velib04c.cpp
+++ b/ve/velib04c.cpp
@@ -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);
diff --git a/ve/vetbeld.h b/ve/vetbeld.h
index 884714f07..82fce32c6 100755
--- a/ve/vetbeld.h
+++ b/ve/vetbeld.h
@@ -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
diff --git a/ve/vetbeld.uml b/ve/vetbeld.uml
index 379506767..f98aab738 100755
--- a/ve/vetbeld.uml
+++ b/ve/vetbeld.uml
@@ -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
diff --git a/ve/vetbtip.uml b/ve/vetbtip.uml
index faf1979ba..9e202a893 100755
--- a/ve/vetbtip.uml
+++ b/ve/vetbtip.uml
@@ -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
diff --git a/xvaga/email.cpp b/xvaga/email.cpp
index e3afbf558..d19f41ac1 100755
--- a/xvaga/email.cpp
+++ b/xvaga/email.cpp
@@ -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") ) ;
diff --git a/xvaga/smapi.cpp b/xvaga/smapi.cpp
index 0e5d869af..dd1396bd3 100755
--- a/xvaga/smapi.cpp
+++ b/xvaga/smapi.cpp
@@ -4,7 +4,7 @@
// Author: PJ Naughter
// 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;
}