Patch level :2.0 partners personalizzazioni
Files correlati :ve7.exe Ricompilazione Demo : [ ] Commento :compilato ve7.exe con le varie personalizzazioni conad,whitesun, teamsystem etc. git-svn-id: svn://10.65.10.50/trunk@11578 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
5f557ca6e0
commit
97d26f74be
@ -9,11 +9,15 @@ int main( int argc, char** argv )
|
||||
|
||||
switch (r)
|
||||
{
|
||||
case 3:
|
||||
ve7400(argc, argv); break; // esportazione bolle CONAD per marpesca
|
||||
case 2:
|
||||
ve7300(argc, argv); break; // stampa riepilogo entrate fornitori
|
||||
case 1:
|
||||
ve7200(argc, argv); break; // stampa flussi di cassa per white sun
|
||||
case 0:
|
||||
default:
|
||||
ve7100(argc, argv); break; // contabilizzazione documenti
|
||||
ve7100(argc, argv); break; // trasferimento documenti Team System
|
||||
}
|
||||
exit(0);
|
||||
return 0;
|
||||
|
2
ve/ve7.h
2
ve/ve7.h
@ -2,6 +2,8 @@
|
||||
#define __VE7_H
|
||||
|
||||
int ve7100 (int, char**);
|
||||
int ve7200 (int, char**);
|
||||
int ve7300 (int, char**);
|
||||
int ve7400 (int, char**);
|
||||
|
||||
#endif
|
||||
|
@ -14,13 +14,15 @@
|
||||
|
||||
#include "ve7100a.h"
|
||||
|
||||
static char rata_types[] = {'3', '3', '1', '2', '4', '3', '1', '2', '2'};
|
||||
|
||||
class TContabil_tsys : public TContabilizzazione // velib04b
|
||||
{
|
||||
ofstream * _output_file;
|
||||
TConfig * _conf;
|
||||
|
||||
protected:
|
||||
virtual error_type write_all(TDocumento& doc, TMovimentoPN & movimento);
|
||||
virtual error_type write_all(TDocumento& doc, TMovimentoPN_VE & movimento);
|
||||
|
||||
public:
|
||||
void open();
|
||||
@ -99,6 +101,8 @@ error_type TContabil_tsys::write_all(TDocumento& doc, TMovimentoPN_VE & moviment
|
||||
// basta solo ritornare qualcosa di != da no_error, per evitare le operazioni successive
|
||||
// a write_all
|
||||
TString row(4500);
|
||||
const TString spaces(2500, ' ');
|
||||
const TString zeros(256, '0');
|
||||
TRectype& head = movimento.lfile().curr();
|
||||
const int iva_items = movimento.iva_items();
|
||||
const int cg_items = movimento.cg_items();
|
||||
@ -367,11 +371,11 @@ error_type TContabil_tsys::write_all(TDocumento& doc, TMovimentoPN_VE & moviment
|
||||
real imprata = pag.importo_rata(i);
|
||||
format_signed(imprata * molt, 12, work);
|
||||
if (work[11] == '-')
|
||||
work[11] == '+';
|
||||
work[11] = '+';
|
||||
row << work;
|
||||
format_signed(doc.bolli(imprata, AUTO_DECIMALS, _netto) * molt, 12, work);
|
||||
if (work[11] == '-')
|
||||
work[11] == '+';
|
||||
work[11] = '+';
|
||||
row << work;
|
||||
check_len("Riba", row, 24);
|
||||
static char tipocf = doc.get_char(DOC_TIPOCF);
|
||||
@ -548,7 +552,7 @@ void TContabil_tsys_app::build_num_sheet()
|
||||
|
||||
bool found = FALSE;
|
||||
for (int i = _tipi_doc.last(); !found && i >= 0; i--)
|
||||
found |= z.find(((TToken_string &)_tipi_doc[i]).get(0)) >= 0;
|
||||
found |= (z.find(((TToken_string &)_tipi_doc[i]).get(0)) >= 0);
|
||||
if (found)
|
||||
_num_sheet->enable_row(pos);
|
||||
else
|
||||
|
@ -1,13 +1,8 @@
|
||||
#include <applicat.h>
|
||||
#include <assoc.h>
|
||||
#include <automask.h>
|
||||
#include <currency.h>
|
||||
#include <msksheet.h>
|
||||
#include <printer.h>
|
||||
#include <recarray.h>
|
||||
#include <relation.h>
|
||||
#include <progind.h>
|
||||
#include <sort.h>
|
||||
|
||||
#include "velib.h"
|
||||
|
||||
#include "ve7.h"
|
||||
@ -246,12 +241,12 @@ public:
|
||||
|
||||
bool TStampaFlussiCassa::create()
|
||||
{
|
||||
open_files(LF_DOC, LF_RIGHEDOC, LF_SCADENZE, LF_CLIFO, LF_CFVEN, 0);
|
||||
open_files(LF_TAB, LF_TABCOM, LF_DOC, LF_RIGHEDOC, LF_PARTITE, LF_SCADENZE, LF_PAGSCA, LF_CLIFO, LF_CFVEN, 0);
|
||||
_rel = new TRelation(LF_SCADENZE);
|
||||
_rel->add(LF_PARTITE,"TIPOC==TIPOC|GRUPPO==GRUPPO|CONTO==CONTO|SOTTOCONTO==SOTTOCONTO|ANNO=ANNO|NUMPART==NUMPART",1,0);
|
||||
_rel->add(LF_PAGSCA, "TIPOC==TIPOC|GRUPPO==GRUPPO|CONTO==CONTO|SOTTOCONTO==SOTTOCONTO|ANNO==ANNO|NUMPART==NUMPART|NRIGA==NRIGA|NRATA==NRATA");
|
||||
|
||||
_cur = new TCursor(_rel, "PAGATA != \"X\"", 2);
|
||||
_cur = new TCursor(_rel, "PAGATA!=\"X\"", 2);
|
||||
_msk = new TFlussi_mask();
|
||||
_form = new TFlussi_form();
|
||||
_sort = new TSort(sizeof(struct_scadenza));
|
||||
@ -344,9 +339,12 @@ void TStampaFlussiCassa::elabora_scad()
|
||||
TRectype& recscad = _cur->curr();
|
||||
const TRectype& recpartita = _cur->curr(LF_PARTITE);
|
||||
|
||||
const long items = _cur->items();
|
||||
const TRecnotype items = _cur->items();
|
||||
_cur->freeze();
|
||||
TProgind pi(items, "Elaboarzione scadenze", FALSE, TRUE);
|
||||
for (*_cur=0; _cur->pos()<items; ++(*_cur))
|
||||
{
|
||||
pi.addstatus(1);
|
||||
struct_scadenza riga_scadenza;
|
||||
TPartita partita(recpartita);
|
||||
const int nriga = recscad.get_int(SCAD_NRIGA);
|
||||
@ -374,18 +372,19 @@ void TStampaFlussiCassa::elabora_scad()
|
||||
const char* record = (const char*) &riga_scadenza;
|
||||
_sort->sort(record);
|
||||
}
|
||||
_cur->freeze(FALSE);
|
||||
}
|
||||
|
||||
void TStampaFlussiCassa::elabora_doc()
|
||||
{
|
||||
TSheet_field& sheet = _msk->sfield(F_SHEETDOC);
|
||||
|
||||
const int items = sheet.items();
|
||||
if (items > 0)
|
||||
{
|
||||
TRelation doc_rel(LF_DOC);
|
||||
TRectype da(LF_DOC);
|
||||
TRectype a(LF_DOC);
|
||||
const long items = sheet.items();
|
||||
if (items > 0)
|
||||
{
|
||||
|
||||
int year_from = _msk->get_int(F_ESERCIZIO);
|
||||
int year_to = _datascadf.year();
|
||||
bool ok = TRUE;
|
||||
@ -407,7 +406,7 @@ void TStampaFlussiCassa::elabora_doc()
|
||||
tipodoc = row->get(2);
|
||||
dastato = row->get_char(4);
|
||||
astato = row->get_char(5);
|
||||
aresiduo = row->get_char(6);
|
||||
aresiduo = row->get_char(6) > ' ';
|
||||
if (codnum.not_empty() && tipodoc.not_empty())
|
||||
{
|
||||
filt_expr << "((CODNUM=\"";
|
||||
@ -425,13 +424,15 @@ void TStampaFlussiCassa::elabora_doc()
|
||||
filt_expr << ")";
|
||||
|
||||
TCursor doc_cur(&doc_rel,filt_expr,3,&da,&a);
|
||||
const long cur_items = doc_cur.items(); // Scorre tutti i documenti che rientrano nell'intervallo selezionato
|
||||
const TRecnotype cur_items = doc_cur.items(); // Scorre tutti i documenti che rientrano nell'intervallo selezionato
|
||||
if (cur_items != 0)
|
||||
{
|
||||
doc_cur.freeze();
|
||||
const TRectype& cur_rec = doc_cur.curr();
|
||||
TProgind pi(cur_items, "Elaborazione documenti", FALSE, TRUE);
|
||||
for (doc_cur = 0; doc_cur.pos() < cur_items; ++doc_cur)
|
||||
{
|
||||
pi.addstatus(1);
|
||||
TDocumento documento(cur_rec);
|
||||
if (documento.is_ordine())
|
||||
{
|
||||
@ -470,7 +471,6 @@ void TStampaFlussiCassa::elabora_doc()
|
||||
doc->scadord_set_next();
|
||||
}
|
||||
}
|
||||
else
|
||||
delete doc;
|
||||
}
|
||||
else
|
||||
@ -510,7 +510,6 @@ void TStampaFlussiCassa::elabora_doc()
|
||||
doc->scadenze_set_next();
|
||||
}
|
||||
}
|
||||
else
|
||||
delete doc;
|
||||
}
|
||||
}
|
||||
|
54
ve/velib.h
54
ve/velib.h
@ -1211,6 +1211,60 @@ public:
|
||||
virtual ~TContabilizzazione();
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// TContabilizzazione
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
// TMovimentoPN_VE
|
||||
// Classe derivata da TMovimentoPN per calcolare automaticamente le righe conabili
|
||||
// una volta settate le righe iva e la riga di totale documento
|
||||
// Sostanzialmente di tratta di aggiungere un metodo in piu' :
|
||||
// recalc_cg_rows(), liberamente ispirato alla notify_iva() in cg2102.cpp
|
||||
|
||||
class TMovimentoPN_VE : public TMovimentoPN
|
||||
{
|
||||
TCausale * _caus;
|
||||
bool _valuta;
|
||||
|
||||
protected:
|
||||
// simula il K_SPACE di iva_notify
|
||||
void create_row(int i, const TString & descr_cr);
|
||||
// simula il K_ENTER di iva_notify
|
||||
void enter_row(int i, const TString & descr_cr);
|
||||
// verifica se si tratta di iva indetraibile
|
||||
bool detraibile(TRectype& rec) const ;
|
||||
// cerca la prima tra quelle di contabilita' che corrisponde al tipo indicato
|
||||
int type2pos(char tipo);
|
||||
// Trova nelle righe contabili un conto nelle righe di tipo prescelto
|
||||
int bill2pos(const TBill& conto, const TString & codcms, const TString & fascms, char tipo);
|
||||
// trasforma un real in TImporto, in base al tipo riga
|
||||
TImporto real2imp(const real& r, char row_type);
|
||||
// setta il record delle righe di contabilita'
|
||||
int insert_cg_rec(int n, const TImporto& imp, TBill& conto, const char * codcms, const char * fascms, const char* desc, char tipo);
|
||||
// setta il record delle righe di contabilita'
|
||||
int set_cg_rec(int n, const TImporto& imp, TBill& conto, const char * codcms, const char * fascms, const char* desc, char tipo);
|
||||
// aggiunge l'importo indicato alla n-esima riga di contabilita'
|
||||
bool add_cg_rec(int n, const TImporto& imp);
|
||||
// Legge l'importo della riga n e lo ritorna col segno dovuto
|
||||
TImporto get_cg_imp(int n);
|
||||
// Setta l'importo della riga n
|
||||
void set_cg_imp(int n, const TImporto& imp);
|
||||
// verifica se il movimento e' quadrato oppure ha qualche maledetto sbilancio
|
||||
// ritorna TRUE, ovviamente, se everything's alright.
|
||||
public:
|
||||
// ricalcola le righe di contabilita' dalle righe iva presenti
|
||||
// e verifica la quadratura del movimento. Ritorna TRUE se il movimento e' scrivibile
|
||||
void set_caus(TCausale * c) { _caus = c;}
|
||||
bool movement_ok() ;
|
||||
void add_row_re(int i);
|
||||
bool add_row_cp_re(int i);
|
||||
void map_conto_re(TBill & c);
|
||||
void destroy_iva_row(int i = -1);
|
||||
int recalc_cg_rows(const TString & descr_cr, TCausale & caus);
|
||||
TMovimentoPN_VE(bool valuta) : _valuta(valuta), _caus(NULL) {};
|
||||
virtual ~TMovimentoPN_VE() {}
|
||||
};
|
||||
|
||||
class TCopia_documento : public TElaborazione // velib04
|
||||
{
|
||||
public:
|
||||
|
@ -30,59 +30,7 @@
|
||||
#include "../cg/cgsaldac.h"
|
||||
#include "../cg/cglib02.h"
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// TContabilizzazione
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
// TMovimentoPN_VE
|
||||
// Classe derivata da TMovimentoPN per calcolare automaticamente le righe conabili
|
||||
// una volta settate le righe iva e la riga di totale documento
|
||||
// Sostanzialmente di tratta di aggiungere un metodo in piu' :
|
||||
// recalc_cg_rows(), liberamente ispirato alla notify_iva() in cg2102.cpp
|
||||
|
||||
class TMovimentoPN_VE : public TMovimentoPN
|
||||
{
|
||||
TCausale * _caus;
|
||||
bool _valuta;
|
||||
|
||||
protected:
|
||||
// simula il K_SPACE di iva_notify
|
||||
void create_row(int i, const TString & descr_cr);
|
||||
// simula il K_ENTER di iva_notify
|
||||
void enter_row(int i, const TString & descr_cr);
|
||||
// verifica se si tratta di iva indetraibile
|
||||
bool detraibile(TRectype& rec) const ;
|
||||
// cerca la prima tra quelle di contabilita' che corrisponde al tipo indicato
|
||||
int type2pos(char tipo);
|
||||
// Trova nelle righe contabili un conto nelle righe di tipo prescelto
|
||||
int bill2pos(const TBill& conto, const TString & codcms, const TString & fascms, char tipo);
|
||||
// trasforma un real in TImporto, in base al tipo riga
|
||||
TImporto real2imp(const real& r, char row_type);
|
||||
// setta il record delle righe di contabilita'
|
||||
int insert_cg_rec(int n, const TImporto& imp, TBill& conto, const char * codcms, const char * fascms, const char* desc, char tipo);
|
||||
// setta il record delle righe di contabilita'
|
||||
int set_cg_rec(int n, const TImporto& imp, TBill& conto, const char * codcms, const char * fascms, const char* desc, char tipo);
|
||||
// aggiunge l'importo indicato alla n-esima riga di contabilita'
|
||||
bool add_cg_rec(int n, const TImporto& imp);
|
||||
// Legge l'importo della riga n e lo ritorna col segno dovuto
|
||||
TImporto get_cg_imp(int n);
|
||||
// Setta l'importo della riga n
|
||||
void set_cg_imp(int n, const TImporto& imp);
|
||||
// verifica se il movimento e' quadrato oppure ha qualche maledetto sbilancio
|
||||
// ritorna TRUE, ovviamente, se everything's alright.
|
||||
public:
|
||||
// ricalcola le righe di contabilita' dalle righe iva presenti
|
||||
// e verifica la quadratura del movimento. Ritorna TRUE se il movimento e' scrivibile
|
||||
void set_caus(TCausale * c) { _caus = c;}
|
||||
bool movement_ok() ;
|
||||
void add_row_re(int i);
|
||||
bool add_row_cp_re(int i);
|
||||
void map_conto_re(TBill & c);
|
||||
void destroy_iva_row(int i = -1);
|
||||
int recalc_cg_rows(const TString & descr_cr, TCausale & caus);
|
||||
TMovimentoPN_VE(bool valuta) : _valuta(valuta), _caus(NULL) {};
|
||||
virtual ~TMovimentoPN_VE() {}
|
||||
};
|
||||
|
||||
void TMovimentoPN_VE::destroy_iva_row(int i)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user