Patch level : 10.958

Files correlati     :  tc1.exe
Ricompilazione Demo : [ ]
Commento            :

Modificato linvio dei clienti e delle fatture intra a zucchetti


git-svn-id: svn://10.65.10.50/branches/R_10_00@21806 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 2011-03-17 13:46:39 +00:00
parent 954c1870e6
commit bb5905b448
6 changed files with 53 additions and 5 deletions

View File

@ -11,6 +11,7 @@
#include "tc1100a.h"
#include <clifo.h>
#include <causali.h>
#include <pconti.h>
#include <mov.h>
#include <rmov.h>
@ -65,10 +66,13 @@ inline TInvio& app() { return (TInvio&) main_app();}
class TInvio_file: public TFile_text
{
bool _recodeclifo;
protected:
virtual void validate(TCursor& cur,TRecord_text &rec, TToken_string &val, TString& str);
public:
void set_recode_clifo(bool on) { _recodeclifo = on; }
const TString& bill2ricl(const char t, int gr, int co, long so, bool completo);
TInvio_file(const TString& file_name);
virtual ~TInvio_file() { }
@ -214,7 +218,13 @@ const TString& TInvio_file::bill2ricl(const char t, int gr, int co, long so, boo
if (completo && t <= ' ')
codricl.format("%02d%03d", co, so);
else
codricl.format("%05d",so);
if (t == 'C')
codricl = "18000";
else
if (t == 'F')
codricl = "36000";
else
codricl.format("%05d",so);
}
else
{
@ -451,6 +461,23 @@ void TInvio_file::validate(TCursor& cur,TRecord_text &rec, TToken_string &s, TSt
valore.strip("-");
valore.strip("+");
valore.strip(".");
}
else if (code == "_RITENUTA")
{
const TRectype & mov = cur.curr(LF_MOV);
const TString4 codcaus = mov.get(MOV_CODCAUS);
const bool intra = cache().get(LF_CAUSALI, codcaus, CAU_INTRACOM)!= "";
if (intra)
valore.cut(0);
else
{
real importo(str);
valore = importo.string(0,2);
valore.strip("-");
valore.strip("+");
valore.strip(".");
}
}
else if (code == "_TIPODOC")
{
@ -570,6 +597,17 @@ void TInvio_file::validate(TCursor& cur,TRecord_text &rec, TToken_string &s, TSt
}
add_field(rec, fldcod, valore.len() == 16 ? "F" : (valore.len() == 0 ? "" : "P"));
}
else if (code == "_CFCODE")
{ROBCOR
if (_recodeclifo)
{
if (cur.curr(LF_CLIFO).get(CLI_TIPOCF) == "C")
valore = "018000";
else
valore = "036000";
}
else valore = str;
}
else if (code == "_CFPIT")
{
const TRectype & mov = cur.curr(LF_MOV);
@ -940,6 +978,7 @@ void TInvio::invio_zucchetti()
remove(filename);
_trasfile = new TInvio_file(filename);
_trasfile->open(filename,'w');
_trasfile->set_recode_clifo(_msk->get_bool(F_RECCLIFOR));
_log = new TLog_report("Trasferimento Zucchetti");
_log->kill_duplicates();

View File

@ -14,3 +14,4 @@
#define F_NUMEROINVIO 112
#define F_DATAINI 113
#define F_DATAFIN 114
#define F_RECCLIFOR 115

View File

@ -185,6 +185,7 @@ TYPE(3) = NUMERO
POSITION(3) = 4
LENGTH(3) = 6
FIELD(3) = 20->CODCF
MESSAGE(3)= _CFCODE
NAME(4) = CODICE SOGGETTO
TYPE(4) = STRINGA
@ -591,7 +592,7 @@ TYPE(30) = IMPORTO
POSITION(30) = 156
LENGTH(30) = 11
FIELD(30) = 23->RITFIS
MESSAGE(30) = _IMPORTO
MESSAGE(30) = _RITENUTA
NAME(31) = SEGNO
TYPE(31) = STRINGA

View File

@ -36,7 +36,7 @@ BEGIN
FLAGS "D"
END
GROUPBOX DLG_NULL 76 6
GROUPBOX DLG_NULL 76 7
BEGIN
PROMPT 2 4 "Dati da inviare"
END
@ -57,9 +57,14 @@ BEGIN
PROMPT 3 7 "Clienti/Fornitori"
END
BOOLEAN F_RECCLIFOR
BEGIN
PROMPT 3 8 "Ricodifica i clienti/Fornitoti"
END
BOOLEAN F_MOVCONT
BEGIN
PROMPT 3 8 "Movimenti contabili"
PROMPT 3 9 "Movimenti contabili"
END
BOOLEAN F_MOVIVA

2
tc/tctbzno.h Executable file
View File

@ -0,0 +1,2 @@
#define F_CODTAB 101
#define F_DESC 102

View File

@ -1,4 +1,4 @@
#include "tctbziv.h"
#include "tctbzno.h"
TOOLBAR "topbar" 0 0 0 2
#include <relapbar.h>