Patch level : 10.0 patch 501
Files correlati : lv2 Ricompilazione Demo : [ ] Commento : Aggiunta la gestione dei codici pagamento e magazzino in testata documenti e IVA sulle righe git-svn-id: svn://10.65.10.50/trunk@19576 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
b2667c6cde
commit
854e5f28de
@ -162,6 +162,15 @@ bool TGenera_documenti_app::crea_documento(const TISAM_recordset& plan, TLog_rep
|
||||
_ndoc = bolle.get(DOC_NDOC).as_int();
|
||||
}
|
||||
|
||||
//recupero il codpag
|
||||
TToken_string key;
|
||||
key.add('C');
|
||||
key.add(codcli);
|
||||
const TString4 codpag = cache().get(LF_CLIFO, key, CLI_CODPAG);
|
||||
|
||||
//reupero la cuasale di magazzino di testata
|
||||
const TString16 causmag = cache().get("%TIP", tpdoc, "S9");
|
||||
|
||||
//creo il documento corretto riempiendo i campi che già conosco
|
||||
TDocumento doc('D', anno, codnum, ++_ndoc);
|
||||
doc.put(DOC_TIPODOC, tpdoc);
|
||||
@ -169,6 +178,8 @@ bool TGenera_documenti_app::crea_documento(const TISAM_recordset& plan, TLog_rep
|
||||
doc.put(DOC_TIPOCF, 'C');
|
||||
doc.put(DOC_CODCF, codcli);
|
||||
doc.put(DOC_CODCONT, codcont);
|
||||
doc.put(DOC_CODPAG, codpag);
|
||||
doc.put(DOC_CAUSMAG, causmag);
|
||||
doc.put("DATAGEN", datagen); //data generazione del documento
|
||||
doc.put("DATAPRCO", dtcons); //data prevista consegna
|
||||
doc.put("CODITI", coditi); //codice itinerario
|
||||
|
@ -353,6 +353,15 @@ TObject* TAcquisizione_cache::key2obj(const char* key)
|
||||
consegne.move_first();
|
||||
const TDate dataprco = consegne.get(LVRCONSPLAN_DTCONS).as_date();
|
||||
|
||||
//recupero il codpag
|
||||
TToken_string key;
|
||||
key.add('C');
|
||||
key.add(codcf);
|
||||
const TString4 codpag = cache().get(LF_CLIFO, key, CLI_CODPAG);
|
||||
|
||||
//reupero la cuasale di magazzino di testata
|
||||
const TString16 causmag = cache().get("%TIP", _tipodoc, "S9");
|
||||
|
||||
doc = new TDocumento('D', datadoc.year(), _codnum, ++_ndoc);
|
||||
doc->put(DOC_TIPODOC, _tipodoc);
|
||||
doc->put(DOC_STATO, _stato);
|
||||
@ -360,6 +369,8 @@ TObject* TAcquisizione_cache::key2obj(const char* key)
|
||||
doc->put(DOC_TIPOCF, 'C');
|
||||
doc->put(DOC_CODCF, codcf);
|
||||
doc->put(DOC_CODCONT, codcont);
|
||||
doc->put(DOC_CODPAG, codpag);
|
||||
doc->put(DOC_CAUSMAG, causmag);
|
||||
doc->put("DATACON", datadoc); //data conteggio
|
||||
doc->put("DATAGEN", datagen); //data generazione del documento
|
||||
doc->put("DATAPRCO", dataprco); //data prevista consegna
|
||||
@ -741,7 +752,7 @@ void TAcquisizione_lavanderie_app::genera_documenti(TLog_report& rep, TAssoc_arr
|
||||
}
|
||||
else
|
||||
{
|
||||
const TRectype& anamag = cache().get(LF_ANAMAG, codart);
|
||||
const TRectype& anamag = cache().get(LF_ANAMAG, codart);
|
||||
|
||||
TRiga_documento& rdoc = doc.new_row("22");
|
||||
rdoc.put(RDOC_CODART, codart);
|
||||
@ -750,7 +761,8 @@ void TAcquisizione_lavanderie_app::genera_documenti(TLog_report& rep, TAssoc_arr
|
||||
rdoc.put(RDOC_CHECKED, 'X');
|
||||
rdoc.put(RDOC_CODAGG1, ini_get_string(CONFIG_DITTA, "lv", "CAUSLAV"));
|
||||
rdoc.put(RDOC_QTAGG1, qtacon);
|
||||
rdoc.put(RDOC_QTA, qtarotti);
|
||||
rdoc.put(RDOC_QTA, qtarotti);
|
||||
rdoc.put(RDOC_CODIVA, anamag.get(ANAMAG_CODIVA));
|
||||
}
|
||||
|
||||
if (!doc.get_date("DATAPRCO").ok() && giri)
|
||||
|
@ -87,6 +87,15 @@ TObject* TBuoni_cache::key2obj(const char* key)
|
||||
const TDate dataprco = consegne.get(LVRCONSPLAN_DTCONS).as_date();
|
||||
const int coditi = consegne.get(LVRCONSPLAN_CODITI).as_int();
|
||||
|
||||
//recupero il codpag
|
||||
TToken_string key;
|
||||
key.add('C');
|
||||
key.add(codcf);
|
||||
const TString4 codpag = cache().get(LF_CLIFO, key, CLI_CODPAG);
|
||||
|
||||
//reupero la cuasale di magazzino di testata
|
||||
const TString16 causmag = cache().get("%TIP", _tipodoc, "S9");
|
||||
|
||||
doc = new TDocumento('D', datadoc.year(), _codnum, ++_ndoc);
|
||||
doc->put(DOC_TIPODOC, _tipodoc);
|
||||
doc->put(DOC_STATO, _stato);
|
||||
@ -94,6 +103,8 @@ TObject* TBuoni_cache::key2obj(const char* key)
|
||||
doc->put(DOC_TIPOCF, 'C');
|
||||
doc->put(DOC_CODCF, codcf);
|
||||
doc->put(DOC_CODCONT, codcont);
|
||||
doc->put(DOC_CODPAG, codpag);
|
||||
doc->put(DOC_CAUSMAG, causmag);
|
||||
doc->put("DATACON", datadoc); //data conteggio
|
||||
doc->put("DATAGEN", datagen); //data generazione del documento
|
||||
doc->put("DATAPRCO", dataprco); //data prevista consegna
|
||||
@ -511,6 +522,10 @@ bool TConta_pulito_msk::genera_documenti(const TFilename& file, TAssoc_array& do
|
||||
rdoc.put(RDOC_CODMAG, magazzino);
|
||||
rdoc.put(RDOC_CODMAGC, magazzinoc);
|
||||
|
||||
//scrivo il codice IVA
|
||||
const TRectype& anamag = cache().get(LF_ANAMAG, rp.articolo());
|
||||
rdoc.put(RDOC_CODIVA, anamag.get(ANAMAG_CODIVA));
|
||||
|
||||
//scrivo i riferimenti alla bolla sul pacco
|
||||
rp.set_rigabolla(datadoc.year(), doc.get(DOC_CODNUM), doc.get_long(DOC_NDOC), doc.rows() + 1);
|
||||
rp.rewrite(pacchi);
|
||||
|
Loading…
x
Reference in New Issue
Block a user