Patch level : 12.0 530
Files correlati : tf Commento : - Tolto tipodoc in decodTipo(), è già presente dentro a strarr - Aggiunto controllo per il tipo documento nei record custom, se non è presente decodifico - Aggiunta pulizia cache prima di ricreare i cursori git-svn-id: svn://10.65.10.50/branches/R_10_00@24360 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
256a6399ac
commit
dbbd6bddcc
@ -133,8 +133,9 @@ bool xvt_fsys_fupdate(const char* src, const char* dst)
|
|||||||
* TD10: Fatt di acquisto intra beni
|
* TD10: Fatt di acquisto intra beni
|
||||||
* TD11: Fatt di acquisto intra servizi
|
* TD11: Fatt di acquisto intra servizi
|
||||||
*/
|
*/
|
||||||
const char* decodTipo(TToken_string* strarr, const TString& tipodoc)
|
const char* decodTipo(TToken_string* strarr)
|
||||||
{
|
{
|
||||||
|
const TString tipodoc = strarr->get(_codnum);
|
||||||
TRectype mov = cache().get(LF_MOV, strarr->get(_numero));
|
TRectype mov = cache().get(LF_MOV, strarr->get(_numero));
|
||||||
TCausale caus(mov.get("CODCAUS"), mov.get_int("ANNOIVA"));
|
TCausale caus(mov.get("CODCAUS"), mov.get_int("ANNOIVA"));
|
||||||
// Le autofatture possono essere solo di tipo TDO1 e le bolle doganali nel dubbio pure
|
// Le autofatture possono essere solo di tipo TDO1 e le bolle doganali nel dubbio pure
|
||||||
@ -1354,7 +1355,7 @@ bool TTrFa_app::tff0700(TSheet_field& sheet)
|
|||||||
|
|
||||||
TString natura = strarr->get(_natura);
|
TString natura = strarr->get(_natura);
|
||||||
|
|
||||||
tff0700f.set("P7_TIPODOC", strarr->get(_codnumAE));
|
tff0700f.set("P7_TIPODOC", strarr->get(_codnumAE));
|
||||||
|
|
||||||
// Controllo il tipo di esigilità
|
// Controllo il tipo di esigilità
|
||||||
tff0700f.set("P7_DATA", toDate(strarr->get(_datadoc)));
|
tff0700f.set("P7_DATA", toDate(strarr->get(_datadoc)));
|
||||||
|
@ -106,7 +106,7 @@ static SLIST_ELT xvt_slist_find_str(SLIST list, const char* str);
|
|||||||
// Aggiorna il file dst se più vecchio di src (Potrebbe diventare una funzione di XVT.h)
|
// Aggiorna il file dst se più vecchio di src (Potrebbe diventare una funzione di XVT.h)
|
||||||
bool xvt_fsys_fupdate(const char* src, const char* dst);
|
bool xvt_fsys_fupdate(const char* src, const char* dst);
|
||||||
// Decodifica il tipo di documento per il trasferimento fatture
|
// Decodifica il tipo di documento per il trasferimento fatture
|
||||||
const char * decodTipo(TToken_string* strarr, const TString& tipodoc);
|
const char * decodTipo(TToken_string* strarr);
|
||||||
// Salvo un singolo record
|
// Salvo un singolo record
|
||||||
bool saveRec(TToken_string row, bool esportato = false);
|
bool saveRec(TToken_string row, bool esportato = false);
|
||||||
// Ritorno una data in formato ANSI
|
// Ritorno una data in formato ANSI
|
||||||
|
@ -674,14 +674,15 @@ void TTrFa_mask::load_sheet()
|
|||||||
row.add(movimento.get_real("IMPOSTA"), _importoIVA); // Imposta
|
row.add(movimento.get_real("IMPOSTA"), _importoIVA); // Imposta
|
||||||
row.add(revCharge(movimento.get("NUMREG"), movimento.get_date("DATAREG").year()), _reverse); // Rev.Charge
|
row.add(revCharge(movimento.get("NUMREG"), movimento.get_date("DATAREG").year()), _reverse); // Rev.Charge
|
||||||
|
|
||||||
|
|
||||||
|
row.add(movimento.get("TIPODOC"), _codnum);
|
||||||
// Calcolo il tipo documento alla fine per sicurezza
|
// Calcolo il tipo documento alla fine per sicurezza
|
||||||
static TString4 td;
|
if (isCust.full())
|
||||||
td.cut(0) << movimento.get("TIPODOC");
|
{
|
||||||
row.add(td, _codnum);
|
row.add(movimento.get("TIPODOCAE").blank() ? decodTipo(&row) : movimento.get("TIPODOCAE"), _codnumAE); // Tipo documento
|
||||||
if(isCust.full())
|
}
|
||||||
row.add(movimento.get("TIPODOCAE"), _codnumAE); // Tipo documento
|
|
||||||
else
|
else
|
||||||
row.add(decodTipo(&row, td), _codnumAE); // Tipo documento
|
row.add(decodTipo(&row), _codnumAE); // Tipo documento
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Possono esistere movimenti custom dove il cliente ha una partita IVA propria
|
* Possono esistere movimenti custom dove il cliente ha una partita IVA propria
|
||||||
|
@ -183,6 +183,9 @@ bool TTrFa_cursors::checkEnabled(TISAM_recordset* origCur)
|
|||||||
|
|
||||||
int TTrFa_cursors::updateFilters(const char tipocf, const long codcf, TDate dal, TDate al, int cod)
|
int TTrFa_cursors::updateFilters(const char tipocf, const long codcf, TDate dal, TDate al, int cod)
|
||||||
{
|
{
|
||||||
|
// Svuoto la cache per aggiornare i file custom
|
||||||
|
cache().discard(LF_TRASFATT);
|
||||||
|
|
||||||
TString query = "USE RMOVIVA\n", queryCust = "USE TRASFATT\n";
|
TString query = "USE RMOVIVA\n", queryCust = "USE TRASFATT\n";
|
||||||
query << "SELECT (23.REG!=\"\")&&BETWEEN(23.DATAREG,#DADATAREG,#ADATAREG)&&(23.TIPO=\"" << tipocf << "\")";
|
query << "SELECT (23.REG!=\"\")&&BETWEEN(23.DATAREG,#DADATAREG,#ADATAREG)&&(23.TIPO=\"" << tipocf << "\")";
|
||||||
queryCust << "SELECT BETWEEN(DATAREG,#DADATAREG,#ADATAREG)&&(TIPO=\"" << tipocf << "\")";
|
queryCust << "SELECT BETWEEN(DATAREG,#DADATAREG,#ADATAREG)&&(TIPO=\"" << tipocf << "\")";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user