Patch level : 10.0

Files correlati     : 777.exe
Ricompilazione Demo : [ ]
Commento            :
Prima implementazione rudimentale delle modifiche al 770 del 2011


git-svn-id: svn://10.65.10.50/branches/R_10_00@22332 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2011-06-28 09:49:04 +00:00
parent a890ff28d6
commit acced1eb27
6 changed files with 80 additions and 93 deletions

View File

@ -141,13 +141,15 @@ BEGIN
INPUT TIPOA F_TIPOA SELECT
INPUT CODANAGR F_CODANAGR SELECT
INPUT NPROG F_NPROG
DISPLAY "N°scheda" NPROG
DISPLAY "Data docum." DATADOC
DISPLAY "N°docum." NUMDOC
DISPLAY "Numero@7" NPROG
DISPLAY "Data\nDocumento@10" DATADOC
DISPLAY "Numero\nDocumento@8" NUMDOC
DISPLAY "Quadro" %CA7->S1
DISPLAY "Caus." CAUSQUA
DISPLAY "Rit.operate@15V" RITOPE
DISPLAY "Rit.versate@15V" RITVER
DISPLAY "Causale\nQuadro@6" CAUSQUA
DISPLAY "Ritenute\noperate@15V" RITOPE
DISPLAY "Ritenute\nversate@15V" RITVER
DISPLAY "Compenso@15V" COMPENSO
OUTPUT F_TIPOA TIPOA
OUTPUT F_CODANAGR CODANAGR
OUTPUT F_NPROG NPROG
@ -155,13 +157,13 @@ END
BUTTON F_GESTPERC 28 2
BEGIN
PROMPT -12 -1 "~Percipienti"
PROMPT -12 -1 "Fatture da ricevere"
MESSAGE RUN,775,-0,#F_CODDITTA,#F_TIPOA,#F_CODANAGR
END
BUTTON F_AGGPAG 28 2
BEGIN
PROMPT -22 -1 "~Aggiornamento pagamenti"
PROMPT -22 -1 "Aggiornamento pagamenti"
END
ENDPAGE

View File

@ -170,11 +170,11 @@ bool TQuadroF::user_create()
filter.format("CODDITTA=%ld|TIPOPRO=\"%c\"|NPROG=1",
_codditta, prosp);
const int alias = -PROSP_A + prosp - 'A';
_rel->add(LF_RIGHEF, filter, 1, 0, alias);
_rel->add(LF_RIGHEF2, filter, 1, 0, alias);
_rel->write_enable(-alias);
}
TRectype dep(LF_RIGHEF);
TRectype dep(LF_RIGHEF2);
dep.zero();
dep.put("CODDITTA", _codditta);
dep.put("TIPOPRO", "A");
@ -195,9 +195,9 @@ bool TQuadroF::user_create()
_rel = new TRelation(LF_QUAF1);
TString80 filter;
filter.format("CODDITTA=%ld|NPROG=1", _codditta);
_rel->add(LF_RIGHEF1, filter);
_rel->add(LF_RIGHEF2, filter);
TRectype dep(LF_RIGHEF1);
TRectype dep(LF_RIGHEF2);
dep.zero();
dep.put("CODDITTA", _codditta);
dep.put("TIPOPRO", "A");

View File

@ -1,30 +1,13 @@
#include <xvt.h>
#include <checks.h>
#include "775.h"
#define usage "Error - usage : %s -{0|1|2|3|4|5} [params]"
int main(int argc,char** argv)
int main(int argc, char** argv)
{
const int n = (argc > 1) ? atoi(argv[1]+1) : -1;
switch(n)
{
case 0:
GestPerc(argc,argv); break;
case 1:
m75200(argc,argv); break;
case 2:
// cg1300(argc,argv); break;
case 3:
// cg1400(argc,argv); break;
case 4:
// cg1500(argc,argv); break;
case 5:
// cg1600(argc,argv); break;
case 6:
// cg1700(argc,argv); break;
default:
error_box(usage, argv[0]); break;
case 1 : m75200(argc,argv); break;
default: GestPerc(argc,argv); break;
}
return n < 0;

View File

@ -14,7 +14,8 @@ class TGestionePercipienti : public TRelation_application
long _codanagr;
bool _auto_posiz, _deleted;
int _anno_dic;
protected:
protected:
virtual void on_config_change();
virtual void init_query_mode(TMask& m);
virtual void init_modify_mode(TMask& m);
@ -26,7 +27,8 @@ class TGestionePercipienti : public TRelation_application
virtual bool changing_mask(int mode) { return FALSE; }
virtual bool remove();
static bool codditta_handler(TMask_field& f, KEY k);
public:
public:
TGestionePercipienti(const long codditta=0L, const char tipoa='\0', const long codanagr=0L);
virtual ~TGestionePercipienti() {};
};
@ -61,9 +63,8 @@ bool TGestionePercipienti::remove()
void TGestionePercipienti::init_mask(TMask& m)
{
TString16 tipo;
m.set(F_ANNODIC, _anno_dic);
tipo << _tipoa;
TString4 tipo; tipo << _tipoa;
m.set(F_TIPOA, tipo);
}
@ -72,7 +73,7 @@ void TGestionePercipienti::init_query_mode(TMask& m)
init_mask(m);
if (_auto_posiz && !_deleted)
{
TString16 dit, tipo, coda;
TString8 dit, tipo, coda;
dit << _codditta;
tipo << _tipoa;
coda << _codanagr;
@ -105,7 +106,7 @@ bool TGestionePercipienti::codditta_handler(TMask_field& f, KEY k)
{
if (k == K_TAB && !(f.mask().is_running()) )
{
TString16 codditta; codditta << app()._codditta;
TString8 codditta; codditta << app()._codditta;
if (codditta != "0")
{
f.set(codditta);
@ -125,7 +126,7 @@ bool TGestionePercipienti::user_create()
_msk->set_handler(F_CODDITTA, codditta_handler);
set_search_field(F_CODANAGR);
return TRUE;
return true;
}
bool TGestionePercipienti::user_destroy()
@ -149,7 +150,7 @@ int GestPerc(int argc, char* argv[])
}
TGestionePercipienti a(codditta, tipoa, codanagr);
a.run(argc, argv, "Gestione percipienti");
a.run(argc, argv, TR("Gestione percipienti"));
return 0;
}

View File

@ -8,7 +8,37 @@
#include "776100b.h"
PAGE "Gestione percipienti" -1 2 78 23
TOOLBAR "topbar" 0 0 0 2
BUTTON DLG_CANCEL 2 2
BEGIN
PROMPT 1 1 "Ritorna"
PICTURE TOOL_CANCEL
END
BUTTON DLG_INFO 2 2
BEGIN
PROMPT 2 1 "Info"
MESSAGE EXIT,K_F2
PICTURE TOOL_INFO
END
BUTTON DLG_HELP 2 2
BEGIN
PROMPT 3 1 "Help"
MESSAGE EXIT,K_F1
PICTURE TOOL_HELP
END
BUTTON DLG_QUIT 2 2
BEGIN
PROMPT 4 1 "Fine"
PICTURE TOOL_QUIT
END
ENDPAGE
PAGE "Gestione percipienti" 0 2 0 0
//----------------------------
// campi comuni a tutti i menu
//----------------------------
@ -1340,17 +1370,6 @@ BEGIN
GROUP MENU_STAMPEDICH
END
BUTTON DLG_CANCEL 15 2
BEGIN
PROMPT -22 -1 "Menu precedente"
END
BUTTON DLG_QUIT 10 2
BEGIN
PROMPT -12 -1 "Fine"
END
ENDPAGE
ENDMASK

View File

@ -678,7 +678,7 @@ void TTracciato770::auto_fill(TString& buffer) const
TTracciato770::TTracciato770(char tipo) : _tipo(tipo)
{
if (strchr("ABDEFHJZ", tipo) == NULL)
if (strchr("ABHJZ", tipo) == NULL)
NFCHECK("Tipo record non valido: %c", tipo);
add_field("Tipo record", AN, 1, 1); // 1
@ -761,33 +761,22 @@ TTracciato770::TTracciato770(char tipo) : _tipo(tipo)
add_field("Casella prospetto ST", CB, 815, 1);
add_field("Casella prospetto SV", CB, 816, 1); // 80
add_field("Casella prospetto SX", CB, 817, 1);
add_field("Presenza 770 ordinario 2010", CB, 818, 1);
add_field("Codice fiscale parte restante", CF, 819,16);
add_field("Protocollo telematico", NU, 835,17); // 84
add_field("Progressivo telematico", NU, 852, 6);
add_field("Casella prospetto SY", CB, 818, 1);
add_field("Presenza 770 ordinario 2011", CB, 819, 1);
add_field("Codice fiscale parte restante", CF, 820,16);
add_field("Protocollo telematico", NU, 836,17); // 85
add_field("Progressivo telematico", NU, 853, 6);
// dichiarazioni integrative o parziali
add_field("Casella prospetto SS", CB, 858, 1); // 86
add_field("Casella prospetto ST", CB, 859, 1);
add_field("Casella prospetto SV", CB, 860, 1);
add_field("Casella prospetto SX", CB, 861, 1);
add_field("Numero comunicaz. lavoro dipendente", NU, 862, 8); // 90
add_field("Numero comunicaz. lavoro autonomo", NU, 870, 8);
add_field("Casella prospetto SS", CB, 859, 1); // 87
add_field("Casella prospetto ST", CB, 860, 1);
add_field("Casella prospetto SV", CB, 861, 1);
add_field("Casella prospetto SX", CB, 862, 1);
add_field("Casella prospetto SY", CB, 863, 1);
add_field("Numero comunicaz. lavoro dipendente", NU, 864, 8);
add_field("Numero comunicaz. lavoro autonomo", NU, 872, 8); // 93
add_field("Codice fiscale", CF,1020,16, 93); // 93
add_field("Denominazione (Alternativo a 91 e 92)",AN,1036,60);
add_field("Cognome", AN,1096,24);
add_field("Nome", AN,1120,20);
add_field("Comune", AN,1140,40);
add_field("Provincia", AN,1180, 2);
add_field("Codice comune", AN,1182, 4);
add_field("Cap comune", AN,1186, 5);
add_field("Tipologia", AN,1191,15);
add_field("Indirizzo", AN,1206,35);
add_field("Numero Civico", AN,1241,10); // 103
add_field("Frazione", AN,1251,35);
add_field("Stato estero", AN,1286,24);
add_field("Codice stato estero", NU,1310, 3); // 106
add_field("Situazioni particolari", NU,1180,1, 100); // 100
add_field("Codice fiscale del rappresentante", CF,1396,16,110); // 110
add_field("Codice carica del rappresentante", NU,1412, 2);
@ -819,19 +808,10 @@ TTracciato770::TTracciato770(char tipo) : _tipo(tipo)
add_field("Codice fiscale C.A.F.", CN,1764,11);
add_field("Codice fiscale professionista", CF,1775,16); // 140
add_field("Firma", CB,1791, 1);
add_field("Importi < 1 Euro", CB,1878, 1, 152); // 152 (AN ma vale 1 o 0)
add_field("Importi < 1 Euro", CB,1878, 1, 152); // 152 (NU ma vale 1 o 0)
} else
if (tipo == 'E')
{
add_field("Codice fiscale del dichiarante", CF, 2, 16); // 2
add_field("Progressivo modulo", NU, 18, 8);
add_field("Spazio a disposizione", AN, 26, 3);
add_field("Tipo operazione", AN, 29, 1);
add_filler(30, 24);
add_field("Spazio a disposizione", AN, 54, 20);
add_field("Identificativo produttore software", AN, 74, 16); // 8
} else
if (tipo == 'F')
/*
if (tipo == 'E' || tipo == 'F')
{
add_field("Codice fiscale del dichiarante", CF, 2, 16); // 2
add_field("Progressivo modulo", NU, 18, 8);
@ -841,6 +821,7 @@ TTracciato770::TTracciato770(char tipo) : _tipo(tipo)
add_field("Spazio a disposizione", AN, 54, 20);
add_field("Identificativo produttore software", AN, 74, 16); // 8
} else
*/
if (tipo == 'H')
{
add_field("Codice fiscale del dichiarante", CF, 2, 16); // 2
@ -871,8 +852,9 @@ TTracciato770::TTracciato770(char tipo) : _tipo(tipo)
add_field("Numero record di tipo 'F'", NU, 43, 9); // 6
add_field("Numero record di tipo 'G'", NU, 52, 9);
add_field("Numero record di tipo 'H'", NU, 61, 9);
add_field("Numero record di tipo 'J'", NU, 70, 9); // 9
add_filler(79, 1819);
add_field("Numero record di tipo 'J'", NU, 70, 9);
add_field("Numero record di tipo 'I'", NU, 79, 9); // 10
add_filler(88, 1810);
}
}
@ -905,7 +887,7 @@ TForm770& TTracciati770::form(const char* quadro, char& tiporec, int& rpm)
switch(quadro[1])
{
case 'A': name = "77qla"; tiporec = 'H'; rpm = 1; break;
case 'T': name = "77qst"; tiporec = 'E'; rpm = 12; break;
case 'T': name = "77qst"; tiporec = 'J'; rpm = 12; break;
default : name = NULL; break;
}
@ -1544,7 +1526,7 @@ bool TTrasferimento770::split(const char* path)
if (_save_headers)
{
rec.tipo_record('A'); // Compila record di testata A
rec.set(3, "77S10"); // Codice fornitura
rec.set(3, "77S11"); // Codice fornitura
rec.set(4, 1); // Tipo fornitore 01 = Soggetto che invia la propria dichiarazione
rec.set(5, cod_fis_dic()); // Codice fiscale del fornitore
if (volumes > 1)