Merge branch 'R12.00.1244' of http://10.65.20.33/sirio/CAMPO/campo into R12.00.1244
This commit is contained in:
commit
f7a1d8485d
4
cd/test/fp1260.txt
Normal file
4
cd/test/fp1260.txt
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
sql\fp0\fp0124.sql
|
||||||
|
fp0.exe
|
||||||
|
|
||||||
|
Rifatta patch per possibile disallineamento
|
27
cd/test/fp1260a.ini
Normal file
27
cd/test/fp1260a.ini
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
[Main]
|
||||||
|
Demo=0
|
||||||
|
|
||||||
|
[fp0]
|
||||||
|
File(0) = fp0.exe|X
|
||||||
|
Patch = 1260
|
||||||
|
Versione = 21511200
|
||||||
|
|
||||||
|
[fp1]
|
||||||
|
File(24) = sql\fp0\fp0126.sql|X
|
||||||
|
Patch = 1260
|
||||||
|
Versione = 21511200
|
||||||
|
|
||||||
|
[fp99]
|
||||||
|
Kill(0) = fppro.msk|x
|
||||||
|
|
||||||
|
[fp]
|
||||||
|
Data = 19-05-2023
|
||||||
|
Descrizione = Fattura Elettronica
|
||||||
|
Dischi = 1
|
||||||
|
Moduli = cg,ve
|
||||||
|
OEM =
|
||||||
|
Patch = 1260
|
||||||
|
PostProcess =
|
||||||
|
PreProcess =
|
||||||
|
Versione = 21511200
|
||||||
|
|
BIN
cd/test/fp1260a1.zip
Normal file
BIN
cd/test/fp1260a1.zip
Normal file
Binary file not shown.
4
cd/test/fp1262.txt
Normal file
4
cd/test/fp1262.txt
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
fp0.exe
|
||||||
|
|
||||||
|
Aggiunta la logica per la gestione dei fornitori di tipo 4 (ovvero quelli che hanno più di un codice fornitore associato).
|
||||||
|
Campo ora cicla su tutti i codici cliente/fornitore associati ad una data partita iva e restituisce quello più grande (quindi l'ultimo inserito ed il più aggiornato)
|
22
cd/test/fp1262a.ini
Normal file
22
cd/test/fp1262a.ini
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
[Main]
|
||||||
|
Demo=0
|
||||||
|
|
||||||
|
[fp0]
|
||||||
|
File(0) = fp0.exe|X
|
||||||
|
Patch = 1262
|
||||||
|
Versione = 21511200
|
||||||
|
|
||||||
|
[fp99]
|
||||||
|
Kill(0) = fppro.msk|x
|
||||||
|
|
||||||
|
[fp]
|
||||||
|
Data = 22-05-2023
|
||||||
|
Descrizione = Fattura Elettronica
|
||||||
|
Dischi = 1
|
||||||
|
Moduli = cg,ve
|
||||||
|
OEM =
|
||||||
|
Patch = 1262
|
||||||
|
PostProcess =
|
||||||
|
PreProcess =
|
||||||
|
Versione = 21511200
|
||||||
|
|
BIN
cd/test/fp1262a1.zip
Normal file
BIN
cd/test/fp1262a1.zip
Normal file
Binary file not shown.
Binary file not shown.
@ -100,6 +100,7 @@ protected:
|
|||||||
static int find_fornitore(TLocalisamfile& clifo);
|
static int find_fornitore(TLocalisamfile& clifo);
|
||||||
static void add_row_err_forn(int forn_code, TSheet_field& sf_err, TString& denom);
|
static void add_row_err_forn(int forn_code, TSheet_field& sf_err, TString& denom);
|
||||||
void aggiungi_riga(TLocalisamfile& clifo, TSheet_field& sf, TSheet_field& sf_err);
|
void aggiungi_riga(TLocalisamfile& clifo, TSheet_field& sf, TSheet_field& sf_err);
|
||||||
|
int gestisci_forn_tipo_4(TString paiv);
|
||||||
// Aggiunge i protocolli che sono già presenti per le fatture nel db alla tabellina per il filtro
|
// Aggiunge i protocolli che sono già presenti per le fatture nel db alla tabellina per il filtro
|
||||||
void aggiungi_prot() const;
|
void aggiungi_prot() const;
|
||||||
void init() const;
|
void init() const;
|
||||||
@ -291,13 +292,13 @@ real TPassive_mask::calcola_importo(vector<iva> riva)
|
|||||||
void TPassive_mask::aggiungi_riga(TLocalisamfile& clifo, TSheet_field& sf, TSheet_field& sf_err)
|
void TPassive_mask::aggiungi_riga(TLocalisamfile& clifo, TSheet_field& sf, TSheet_field& sf_err)
|
||||||
{
|
{
|
||||||
TString denom = fp_db().sq_get("RAG_SOC");
|
TString denom = fp_db().sq_get("RAG_SOC");
|
||||||
const TString& paa_codfisc = fp_db().sq_get("COD_FISC");
|
TString paa_codfisc = fp_db().sq_get("COD_FISC");
|
||||||
const TString& paa_piva = fp_db().sq_get("P_IVA");
|
TString paa_piva = fp_db().sq_get("P_IVA");
|
||||||
const TString& paa_codpaese = fp_db().sq_get("COD_PAESE");
|
TString paa_codpaese = fp_db().sq_get("COD_PAESE");
|
||||||
const TDate& dataregcont = fp_db().sq_get_date("DATAREGCONT");
|
TDate dataregcont = fp_db().sq_get_date("DATAREGCONT");
|
||||||
const TString& filter_elab = get_fattsel();
|
TString filter_elab = get_fattsel();
|
||||||
const bool is_contab = dataregcont != TDate("20010101");
|
bool is_contab = dataregcont != TDate("20010101");
|
||||||
const TString& id_sdi = fp_db().sq_get("ID_SDI");
|
TString id_sdi = fp_db().sq_get("ID_SDI");
|
||||||
|
|
||||||
TToken_string keys("", ';');
|
TToken_string keys("", ';');
|
||||||
keys.add(fp_db().sq_get("KEYPROG")); keys.add(fp_db().sq_get("KEYHEAD")); keys.add(fp_db().sq_get("KEYFATT"));
|
keys.add(fp_db().sq_get("KEYPROG")); keys.add(fp_db().sq_get("KEYHEAD")); keys.add(fp_db().sq_get("KEYFATT"));
|
||||||
@ -312,11 +313,8 @@ void TPassive_mask::aggiungi_riga(TLocalisamfile& clifo, TSheet_field& sf, TShee
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
const bool data_range = dataregcont >= TDate(get(F_DATAINIREG)) && dataregcont <= TDate(get(F_DATAENDREG));
|
const bool data_range = dataregcont >= TDate(get(F_DATAINIREG)) && dataregcont <= TDate(get(F_DATAENDREG));
|
||||||
|
|
||||||
//INDAGARE QUI IL PROBLEMA DELLA SILE
|
|
||||||
|
|
||||||
if (filter_elab.blank() && forn_code != 0 // Filtro sui non associati
|
if (filter_elab.blank() && forn_code != 0 // Filtro sui non associati
|
||||||
|| filter_elab == FILTER_ASS && forn_code == 0 && !is_contab // Filtro sui associati e non contab.
|
|| filter_elab == FILTER_ASS && (forn_code == 0 || forn_code == -16) && !is_contab // Filtro sui associati e non contab.
|
||||||
|| filter_elab == FILTER_CONT && forn_code == 0 && is_contab && data_range // Filtro solo contabilizzati e data
|
|| filter_elab == FILTER_CONT && forn_code == 0 && is_contab && data_range // Filtro solo contabilizzati e data
|
||||||
|| filter_elab == FILTER_ALL) // Tutte
|
|| filter_elab == FILTER_ALL) // Tutte
|
||||||
{
|
{
|
||||||
@ -330,7 +328,7 @@ void TPassive_mask::aggiungi_riga(TLocalisamfile& clifo, TSheet_field& sf, TShee
|
|||||||
|
|
||||||
if (filter_elab == FILTER_NOASS)
|
if (filter_elab == FILTER_NOASS)
|
||||||
{
|
{
|
||||||
if (forn_code<0)
|
if (forn_code<0 && forn_code != tipo_forn_4)
|
||||||
{
|
{
|
||||||
const int row = sf.set_row_cell(S_ANNO, fp_db().sq_get_int("ANNO"));
|
const int row = sf.set_row_cell(S_ANNO, fp_db().sq_get_int("ANNO"));
|
||||||
sf.set_row_cell(S_TIPODOCSDI, tiposdi, row);
|
sf.set_row_cell(S_TIPODOCSDI, tiposdi, row);
|
||||||
@ -408,6 +406,15 @@ void TPassive_mask::aggiungi_riga(TLocalisamfile& clifo, TSheet_field& sf, TShee
|
|||||||
sf.set_row_cell(S_FORNITORE, clifo.get(CLI_CODCF), row);
|
sf.set_row_cell(S_FORNITORE, clifo.get(CLI_CODCF), row);
|
||||||
sf.set_row_cell(S_RAGSOC, clifo.get(CLI_RAGSOC), row);
|
sf.set_row_cell(S_RAGSOC, clifo.get(CLI_RAGSOC), row);
|
||||||
}
|
}
|
||||||
|
else if (forn_code == tipo_forn_4) {
|
||||||
|
int last_codcf = gestisci_forn_tipo_4(paa_piva);
|
||||||
|
if (last_codcf != -1) {
|
||||||
|
sf.set_row_cell(S_FPPRO, true, row);
|
||||||
|
sf.set_row_cell(S_FORNITORE, last_codcf, row);
|
||||||
|
sf.set_row_cell(S_RAGSOC, clifo.get(CLI_RAGSOC), row);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
else if (_list_fatt_err.find(denom) == _list_fatt_err.end())
|
else if (_list_fatt_err.find(denom) == _list_fatt_err.end())
|
||||||
{
|
{
|
||||||
TForn_err& forn_err = _list_fatt_err[denom];
|
TForn_err& forn_err = _list_fatt_err[denom];
|
||||||
@ -430,6 +437,30 @@ void TPassive_mask::aggiungi_riga(TLocalisamfile& clifo, TSheet_field& sf, TShee
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int TPassive_mask::gestisci_forn_tipo_4(TString paiv) {
|
||||||
|
|
||||||
|
int last_codcf = -1;
|
||||||
|
int current_codcf = -1;
|
||||||
|
|
||||||
|
TRectype filter(LF_CLIFO);
|
||||||
|
|
||||||
|
TRelation clifo(LF_CLIFO);
|
||||||
|
TRectype& forn = clifo.curr();
|
||||||
|
forn.put(CLI_TIPOCF, "F");
|
||||||
|
TString filtro;
|
||||||
|
filtro << "(PAIV==\"" << paiv << "\")";
|
||||||
|
TCursor cur(&clifo, filtro, 5, &filter, &filter);
|
||||||
|
const long items = cur.items();
|
||||||
|
|
||||||
|
for (cur = 0L; cur.pos() < items; ++cur) {
|
||||||
|
int current_codcf = cur.curr().get_int(CLI_CODCF);
|
||||||
|
if (current_codcf > last_codcf)
|
||||||
|
last_codcf = current_codcf;
|
||||||
|
}
|
||||||
|
|
||||||
|
return last_codcf;
|
||||||
|
}
|
||||||
|
|
||||||
void TPassive_mask::aggiungi_prot() const
|
void TPassive_mask::aggiungi_prot() const
|
||||||
{
|
{
|
||||||
TSheet_field& sf_prot = sfield(F_PROT);
|
TSheet_field& sf_prot = sfield(F_PROT);
|
||||||
@ -534,11 +565,11 @@ void TPassive_mask::auto_assoc()
|
|||||||
|
|
||||||
int TPassive_mask::find_fornitore(TLocalisamfile& clifo)
|
int TPassive_mask::find_fornitore(TLocalisamfile& clifo)
|
||||||
{
|
{
|
||||||
const TString paa_codfisc = fp_db().sq_get("COD_FISC");
|
TString paa_codfisc = fp_db().sq_get("COD_FISC");
|
||||||
const TString paa_piva = fp_db().sq_get("P_IVA");
|
TString paa_piva = fp_db().sq_get("P_IVA");
|
||||||
const TString paa_codpaese = fp_db().sq_get("COD_PAESE");
|
TString paa_codpaese = fp_db().sq_get("COD_PAESE");
|
||||||
const TString fppro_tipocf = fp_db().sq_get("TIPO_CF");
|
TString fppro_tipocf = fp_db().sq_get("TIPO_CF");
|
||||||
const TString fppro_codcf = fp_db().sq_get("COD_CLIFOR");
|
TString fppro_codcf = fp_db().sq_get("COD_CLIFOR");
|
||||||
|
|
||||||
// Cerco se il fornitore è presente in Campo
|
// Cerco se il fornitore è presente in Campo
|
||||||
int found_clifo = -1;
|
int found_clifo = -1;
|
||||||
@ -602,7 +633,11 @@ int TPassive_mask::find_fornitore(TLocalisamfile& clifo)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Controllo che non abbia 4 come tipo fornitore
|
// Controllo che non abbia 4 come tipo fornitore
|
||||||
found_clifo = found_clifo == found_piva && clifo.get(CLI_ALLEG) == "4" ? tipo_forn_4 : found_clifo;
|
|
||||||
|
if (found_clifo == found_piva && clifo.get(CLI_ALLEG) == "4")
|
||||||
|
found_clifo = tipo_forn_4;
|
||||||
|
else
|
||||||
|
found_clifo == found_clifo;
|
||||||
|
|
||||||
return found_clifo;
|
return found_clifo;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user