Patch level : 10.0 606
Files correlati : lv4.exe Ricompilazione Demo : [ ] Commento : Aggiunta creazione file ini per le fatture in sospensione aperte git-svn-id: svn://10.65.10.50/trunk@20081 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
6aa5e5509b
commit
5582ba823e
@ -121,6 +121,7 @@ class TImporta_sc : public TSkeleton_application
|
||||
|
||||
TCausali_cache _cache_causali;
|
||||
TBill _clienti, _fornitori;
|
||||
int _fattsosp;
|
||||
|
||||
private:
|
||||
void nuovo_pagamento_o_nota(const TImporta_cogeco_recset& recset, TPartita& game, tipo_movimento tm, bool is_riba);
|
||||
@ -298,18 +299,31 @@ long TImporta_sc::fattura_in_sospensione(const TImporta_cogeco_recset& recset, c
|
||||
|
||||
conf.set_paragraph("23"); //setto il paragrafo [23] del file ini (testata)
|
||||
conf.set(MOV_CODCAUS, rigafat.get(PART_CODCAUS));
|
||||
conf.set(MOV_DATAREG, rigafat.get_date(PART_DATAREG));
|
||||
conf.set(MOV_CODPAG, rigafat.get(PART_CODPAG));
|
||||
conf.set(MOV_DATADOC, rigafat.get(PART_DATADOC));
|
||||
conf.set(MOV_NUMDOC, rigafat.get(PART_NUMDOC));
|
||||
TDate datareg = rigafat.get_date(PART_DATAREG);
|
||||
|
||||
if (esercizi().date2esc(datareg) == 0)
|
||||
datareg = esercizi().esercizio(esercizi().first()).inizio();
|
||||
conf.set(MOV_DATAREG, datareg);
|
||||
TDate datadoc = rigafat.get_date(PART_DATADOC);
|
||||
|
||||
if (!datadoc.ok())
|
||||
datadoc = esercizi().esercizio(esercizi().first()).inizio();
|
||||
conf.set(MOV_DATADOC, datadoc);
|
||||
TString16 numdoc = rigafat.get(PART_NUMDOC);
|
||||
|
||||
if (numdoc.blank())
|
||||
numdoc = "1";
|
||||
conf.set(MOV_NUMDOC, numdoc);
|
||||
conf.set("SOLAIVA", "X");
|
||||
conf.set(MOV_STAMPATO, "X");
|
||||
conf.set(MOV_REGST, "X");
|
||||
conf.set(MOV_NUMDOC, rigafat.get(PART_DESCR));
|
||||
conf.set(MOV_LIQDIFF, "X");
|
||||
conf.set(MOV_DESCR, rigafat.get(PART_DESCR));
|
||||
conf.set(MOV_TIPO, rigafat.get(PART_TIPOCF));
|
||||
conf.set(MOV_CODCF, rigafat.get(PART_SOTTOCONTO));
|
||||
conf.set(MOV_TOTDOC, rigafat.get(PART_IMPTOTDOC));
|
||||
conf.set("CODIVA", _msk->get(F_CODIVA));
|
||||
_fattsosp++;
|
||||
|
||||
return nmov;
|
||||
}
|
||||
@ -655,15 +669,19 @@ void TImporta_sc::salva_partita(TPartita*& game, long nmov)
|
||||
if (game != NULL)
|
||||
{
|
||||
game->write();
|
||||
if (game->chiusa(true))
|
||||
if (_fattsosp > 0 && game->chiusa(true))
|
||||
{
|
||||
TFilename temp(_msk->get(F_PATHOUT));
|
||||
while (_fattsosp-- > 0)
|
||||
{
|
||||
TFilename temp(_msk->get(F_PATHOUT));
|
||||
|
||||
temp << '/' << format("%05ld", nmov--);
|
||||
temp.ext("ini");
|
||||
if (fexist(temp))
|
||||
remove_file(temp);
|
||||
temp << '/' << format("%05ld", --nmov);
|
||||
temp.ext("ini");
|
||||
if (fexist(temp))
|
||||
remove_file(temp);
|
||||
}
|
||||
}
|
||||
_fattsosp = 0;
|
||||
delete game;
|
||||
game = NULL;
|
||||
}
|
||||
@ -687,6 +705,7 @@ void TImporta_sc::transfer(const TFilename& file)
|
||||
const TString& codcausc = _msk->get(F_CODCAUSC);
|
||||
const TString& codcausf = _msk->get(F_CODCAUSF);
|
||||
long nmov = 1L;
|
||||
_fattsosp = 0;
|
||||
|
||||
TLog_report log(caption);
|
||||
|
||||
@ -758,6 +777,7 @@ void TImporta_sc::transfer(const TFilename& file)
|
||||
const TRiga_partite & rigafat = nuova_fattura(recset, *game);
|
||||
|
||||
nmov = fattura_in_sospensione( recset, rigafat, nmov);
|
||||
|
||||
break;
|
||||
} // Fattura in sospensione
|
||||
case 4: nuova_nota_credito(recset, *game); break; // Reso su fattura in sospensione
|
||||
|
@ -125,7 +125,7 @@ STRING F_DESCRIVA 50
|
||||
BEGIN
|
||||
PROMPT 20 12 ""
|
||||
USE %IVA KEY 2
|
||||
INPUT DESCR F_DESCRIVA
|
||||
INPUT S0 F_DESCRIVA
|
||||
DISPLAY "Descrizione@60" S0
|
||||
DISPLAY "Codice" CODCAUS
|
||||
COPY OUTPUT F_CODIVA
|
||||
|
Loading…
x
Reference in New Issue
Block a user