Patch level : 10.0 582
Files correlati : lv2.exe Ricompilazione Demo : [ ] Commento : Fattrazione capogruppo 1a parte fatture singole per ogni cliente git-svn-id: svn://10.65.10.50/trunk@19935 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
d5557a2b3a
commit
421efe0950
@ -5,6 +5,7 @@
|
||||
#include "lvlib.h"
|
||||
#include "lv2500a.h"
|
||||
|
||||
#include "clifo.h"
|
||||
#include "cfven.h"
|
||||
#include "lvcondv.h"
|
||||
#include "lvrcondv.h"
|
||||
@ -958,6 +959,35 @@ void TFatturazione_lavanderie::post_process(TLista_documenti& doc_out, TLista_do
|
||||
if (to_delete)
|
||||
doc_out.destroy(id);
|
||||
}
|
||||
for (int id = doc_out.items() - 1; id >= 0 ; id--)
|
||||
{
|
||||
TDocumento& doc = doc_out[id];
|
||||
const TString4 tipocf = doc.get(DOC_TIPOCF);
|
||||
const int act_cli = doc.get_long(DOC_CODCF);
|
||||
TToken_string key(tipocf);
|
||||
|
||||
key.add(act_cli);
|
||||
|
||||
const TRectype & reccli = cache().get(LF_CLIFO, key);
|
||||
const long new_cli = reccli.get_long(CLI_CODCFFATT);
|
||||
|
||||
if (new_cli > 0L)
|
||||
{
|
||||
doc.put(DOC_CODCF, new_cli);
|
||||
key = tipocf;
|
||||
key.add(new_cli);
|
||||
const TRectype & new_reccliven = cache().get(LF_CFVEN, key);
|
||||
doc.put(DOC_CODINDSP, new_reccliven.get(CFV_CODINDDOC));
|
||||
|
||||
TString descr;
|
||||
TRiga_documento & r = doc.insert_row(1, "05");
|
||||
|
||||
r.put(RDOC_DESCR, "Consegne effettuate presso\n");
|
||||
descr << act_cli << " " << reccli.get(CLI_RAGSOC);
|
||||
r.put(RDOC_DESCLUNGA, "X");
|
||||
r.put(RDOC_DESCEST, descr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user