Patch level : 12.0
Files correlati : Commento: Modifiche programma Archiviazione sostitutiva
This commit is contained in:
parent
45c9b185b9
commit
eb06dc642f
@ -457,20 +457,20 @@ void set_periodprec(bool flag)
|
||||
ini_set_bool(CONFIG_DITTA, FILE_SECTION, "flag_periodprec", flag);
|
||||
}
|
||||
|
||||
bool check_causale(const TString& cod_caus, bool acq)
|
||||
bool check_causale(const TString& cod_caus, int year, bool acq)
|
||||
{
|
||||
return cod_caus.full() && (
|
||||
check_causale(cod_caus, "FA", acq) ||
|
||||
check_causale(cod_caus, "BD", acq) ||
|
||||
check_causale(cod_caus, "AF", acq) ||
|
||||
check_causale(cod_caus, "FF", acq) ||
|
||||
check_causale(cod_caus, "NC", acq) ||
|
||||
check_causale(cod_caus, "ND", acq));
|
||||
check_causale(cod_caus, year, "FA", acq) ||
|
||||
check_causale(cod_caus, year, "BD", acq) ||
|
||||
check_causale(cod_caus, year, "AF", acq) ||
|
||||
check_causale(cod_caus, year, "FF", acq) ||
|
||||
check_causale(cod_caus, year, "NC", acq) ||
|
||||
check_causale(cod_caus, year, "ND", acq));
|
||||
}
|
||||
|
||||
bool check_causale(const TString& cod_caus, const TString& tipo_doc, bool acq)
|
||||
bool check_causale(const TString& cod_caus, int year, const TString& tipo_doc, bool acq)
|
||||
{
|
||||
const TCausale& c = cached_causale(cod_caus);
|
||||
const TCausale& c = cached_causale(cod_caus, year);
|
||||
|
||||
if(tipo_doc == "FA" || tipo_doc == "BD" || tipo_doc == "AF" || tipo_doc == "FF")
|
||||
return c.tipo_doc() == tipo_doc;
|
||||
|
@ -129,9 +129,9 @@ void set_dataendreg(const TString& date);
|
||||
void set_periodprec(bool flag);
|
||||
|
||||
// Controlla se il "cod_caus" e' per Fatture d'acquisto o Note Credito d'Acquisto
|
||||
bool check_causale(const TString& cod_caus, bool acq = true);
|
||||
bool check_causale(const TString& cod_caus, int year, bool acq = true);
|
||||
// Controlla se il "cod_caus" ha come "tipo_doc" FA o NC (di acquisto)
|
||||
bool check_causale(const TString& cod_caus, const TString& tipo_doc, bool acq = true);
|
||||
bool check_causale(const TString& cod_caus, int year, const TString& tipo_doc, bool acq = true);
|
||||
bool check_caus_has_rit(const TString& cod_caus, int year = 0);
|
||||
void run_cont_ini(bool liq);
|
||||
|
||||
|
@ -216,7 +216,6 @@ void TPassive_mask::fill()
|
||||
"LEFT JOIN FPPRO00F FPPRO ON P1_KEYPRGINVIO = PZ_KEYPRGINVIO and P1_KEYHEADERFATT = PZ_KEYHEADERFATT and P1_KEYBODYFATT = PZ_KEYBODYFATT\n" <<
|
||||
"WHERE PZ_DATAORARIC >= \'" << dal.date2ansi() << "\' AND PZ_DATAORARIC < \'" << (al+(long)1).date2ansi() << "\'" << prots_query << "\n" <<
|
||||
"GROUP BY YEAR(P7_DATA), P7_TIPODOC, P7_NUMERO, P7_DATA, PZ_DATAORARIC, PQ_IMPTOTDOC, PZ_NUMREGCONT, PZ_DATAREGCONT, P2_ANADENOMIN, P2_ANANOME, P2_ANACOGNOME, P2_FISCIVACOD, P2_CODFISCALE, P2_FISCIVAPAESE,\n" <<
|
||||
|
||||
"P1_CODDEST, PU_PEC, P1_KEYPRGINVIO, P1_KEYHEADERFATT, P1_KEYBODYFATT, PZ_TIPOPROT, PZ_NUMPROT, PZ_ANNOPROT, PZ_TIPOCF, PZ_CLIFOR, PZ_NUMERO, PZ_DATA\n" <<
|
||||
"ORDER BY " << (ordin == "D"? "P7_DATA" : "PZ_DATAORARIC") << " " << (verso_ord == "C"? "ASC" : "DESC");
|
||||
fp_db().sq_set_exec(query, false);
|
||||
@ -364,7 +363,6 @@ void TPassive_mask::aggiungi_riga(TLocalisamfile& clifo, TSheet_field& sf, TShee
|
||||
sf.set_row_cell(S_ATTACH, fp_db().sq_get("ATTACHMENT")!="0", row);
|
||||
sf.set_row_cell(S_RAGXML, denom, row);
|
||||
sf.set_row_cell(S_NPROT, TProtocollo(fp_db().sq_get_int("ANNO_PROT"), fp_db().sq_get("TIPO_PROT"), fp_db().sq_get("NUM_PROT")).get_prot_str(), row);
|
||||
|
||||
sf.set_row_cell(S_NDOC, fp_db().sq_get("PZ_NUMERO"), row);
|
||||
sf.set_row_cell(S_DATADOC, fp_db().sq_get_date("PZ_DATA"), row);
|
||||
sf.set_row_cell(S_PROKEY, keys, row);
|
||||
@ -710,6 +708,7 @@ int TPassive_mask::prepara_contab() const
|
||||
contab_ini.set(MOV_DATADOC, datadoc);
|
||||
contab_ini.set(MOV_NUMDOCEXT, sf.get_str_row_cell(row, S_NDOC));
|
||||
contab_ini.set(MOV_NUMDOC, TString(sf.get_str_row_cell(row, S_NDOC)).right(7));
|
||||
contab_ini.set(MOV_DATADOCSDI, sf.get_date_row_cell(row, S_DATADOCR));
|
||||
contab_ini.set(MOV_IDDOCSDI, sf.get_str_row_cell(row, S_NDOC));
|
||||
contab_ini.set(MOV_DATADOCSDI, sf.get_date_row_cell(row, S_DATADOC));
|
||||
if (get_bool(F_PERIODPREC))
|
||||
|
Loading…
x
Reference in New Issue
Block a user