Corretti errori prima nota e parametri ditta
git-svn-id: svn://10.65.10.50/trunk@1056 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
9122d42b16
commit
098c897849
@ -299,6 +299,8 @@ HIDDEN bool alleg_handler(TMask_field& f, KEY key)
|
||||
m.reset(F_RAGSOCALLEG);
|
||||
}
|
||||
m.set(F_OCCASIONALE, (tipoall == 2) ? "X" : " ");
|
||||
m.field(F_COFI).set_dirty(TRUE);
|
||||
m.field(F_PAIV).set_dirty(TRUE);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
134
cg/cg2100b.uml
134
cg/cg2100b.uml
@ -60,74 +60,9 @@ BEGIN
|
||||
FLAGS "DRZ"
|
||||
END
|
||||
|
||||
DATE F_DATADOC
|
||||
BEGIN
|
||||
PROMPT 1 5 "Data del documento "
|
||||
HELP "Data del documento generante il movimento"
|
||||
FIELD DATADOC
|
||||
WARNING "Specificare una data del documento non superiore a quella dell'operazione"
|
||||
VALIDATE DATE_CMP_FUNC <= F_DATAREG
|
||||
END
|
||||
|
||||
STRING F_NUMDOC 7
|
||||
BEGIN
|
||||
PROMPT 56 5 "Documento n. "
|
||||
HELP "Numero del documento generante il movimento"
|
||||
FIELD NUMDOC
|
||||
WARNING "La causale impone di specificare il numero documento"
|
||||
END
|
||||
|
||||
NUMBER F_ANNOIVA 4
|
||||
BEGIN
|
||||
FLAGS "H"
|
||||
END
|
||||
|
||||
STRING F_DESCAGG 5
|
||||
BEGIN
|
||||
PROMPT 1 6 "Descrizione "
|
||||
HELP "Codice descrizione del movimento di contabilita'"
|
||||
FLAGS "UZ"
|
||||
USE %DPN
|
||||
INPUT CODTAB F_DESCAGG
|
||||
DISPLAY "Codice" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT F_DESCAGG CODTAB
|
||||
OUTPUT F_DESCR S0
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
STRING F_DESCR 50
|
||||
BEGIN
|
||||
PROMPT 25 6 ""
|
||||
HELP "Descrizione del movimento di contabilita'"
|
||||
FIELD DESCR
|
||||
USE %DPN KEY 2
|
||||
INPUT S0 F_DESCR
|
||||
DISPLAY "Descrizione@50" S0
|
||||
DISPLAY "Codice" CODTAB
|
||||
COPY OUTPUT F_DESCAGG
|
||||
END
|
||||
|
||||
LIST F_PROVVISORIO 1 25
|
||||
BEGIN
|
||||
PROMPT 1 7 "Movimento provvisorio "
|
||||
HELP "Indicare se si tratta di movimento provvisorio"
|
||||
FIELD PROVVIS
|
||||
ITEM " |No (movimento normale)"
|
||||
ITEM "P|Si (cancellabile)"
|
||||
ITEM "N|Si (non cancellabile)"
|
||||
END
|
||||
|
||||
STRING F_TIPODOC 2
|
||||
BEGIN
|
||||
PROMPT 60 7 "Tipo documento "
|
||||
FIELD TIPODOC
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
STRING F_CODCAUS 3
|
||||
BEGIN
|
||||
PROMPT 1 8 "Causale "
|
||||
PROMPT 1 5 "Causale "
|
||||
HELP "Codice della causale generante l'operazione"
|
||||
FLAGS "UZ"
|
||||
FIELD CODCAUS
|
||||
@ -146,7 +81,7 @@ END
|
||||
|
||||
STRING F_DESCRCAUS 50
|
||||
BEGIN
|
||||
PROMPT 25 8 ""
|
||||
PROMPT 25 5 ""
|
||||
HELP "Descrizione della causale generante l'operazione"
|
||||
USE LF_CAUSALI KEY 2
|
||||
INPUT DESCR F_DESCRCAUS
|
||||
@ -155,6 +90,71 @@ BEGIN
|
||||
COPY OUTPUT F_CODCAUS
|
||||
END
|
||||
|
||||
LIST F_PROVVISORIO 1 25
|
||||
BEGIN
|
||||
PROMPT 1 6 "Movimento provvisorio "
|
||||
HELP "Indicare se si tratta di movimento provvisorio"
|
||||
FIELD PROVVIS
|
||||
ITEM " |No (movimento normale)"
|
||||
ITEM "P|Si (cancellabile)"
|
||||
ITEM "N|Si (non cancellabile)"
|
||||
END
|
||||
|
||||
STRING F_TIPODOC 2
|
||||
BEGIN
|
||||
PROMPT 60 6 "Tipo documento "
|
||||
FIELD TIPODOC
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
DATE F_DATADOC
|
||||
BEGIN
|
||||
PROMPT 1 7 "Data del documento "
|
||||
HELP "Data del documento generante il movimento"
|
||||
FIELD DATADOC
|
||||
WARNING "Specificare una data del documento non superiore a quella dell'operazione"
|
||||
VALIDATE DATE_CMP_FUNC <= F_DATAREG
|
||||
END
|
||||
|
||||
STRING F_NUMDOC 7
|
||||
BEGIN
|
||||
PROMPT 56 7 "Documento n. "
|
||||
HELP "Numero del documento generante il movimento"
|
||||
FIELD NUMDOC
|
||||
WARNING "La causale impone di specificare il numero documento"
|
||||
END
|
||||
|
||||
NUMBER F_ANNOIVA 4
|
||||
BEGIN
|
||||
FLAGS "H"
|
||||
END
|
||||
|
||||
STRING F_DESCAGG 5
|
||||
BEGIN
|
||||
PROMPT 1 8 "Descrizione "
|
||||
HELP "Codice descrizione del movimento di contabilita'"
|
||||
FLAGS "UZ"
|
||||
USE %DPN
|
||||
INPUT CODTAB F_DESCAGG
|
||||
DISPLAY "Codice" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT F_DESCAGG CODTAB
|
||||
OUTPUT F_DESCR S0
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
STRING F_DESCR 50
|
||||
BEGIN
|
||||
PROMPT 25 8 ""
|
||||
HELP "Descrizione del movimento di contabilita'"
|
||||
FIELD DESCR
|
||||
USE %DPN KEY 2
|
||||
INPUT S0 F_DESCR
|
||||
DISPLAY "Descrizione@50" S0
|
||||
DISPLAY "Codice" CODTAB
|
||||
COPY OUTPUT F_DESCAGG
|
||||
END
|
||||
|
||||
STRING F_VALUTA 3
|
||||
BEGIN
|
||||
PROMPT 1 9 "Valuta "
|
||||
|
160
cg/cg2100c.uml
160
cg/cg2100c.uml
@ -57,22 +57,6 @@ BEGIN
|
||||
MESSAGE COPY,H_DATAREG|COPY,F_ANNOIVA,7,10
|
||||
END
|
||||
|
||||
DATE F_DATACOMP
|
||||
BEGIN
|
||||
PROMPT 1 4 "Data competenza "
|
||||
HELP "Data di competenza dell'operazione"
|
||||
FIELD LF_MOV->DATACOMP
|
||||
END
|
||||
|
||||
DATE F_DATADOC
|
||||
BEGIN
|
||||
PROMPT 1 5 "Data documento "
|
||||
FIELD LF_MOV->DATADOC
|
||||
HELP "Data del documento che ha generato il movimento"
|
||||
WARNING "Inserire una data documento non superiore alla data dell'operazione"
|
||||
VALIDATE DATE_CMP_FUNC <= F_DATAREG
|
||||
END
|
||||
|
||||
NUMBER F_ANNOIVA 4
|
||||
BEGIN
|
||||
PROMPT 32 3 "Anno IVA "
|
||||
@ -80,6 +64,13 @@ BEGIN
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
DATE F_DATACOMP
|
||||
BEGIN
|
||||
PROMPT 1 4 "Data competenza "
|
||||
HELP "Data di competenza dell'operazione"
|
||||
FIELD LF_MOV->DATACOMP
|
||||
END
|
||||
|
||||
NUMBER F_ANNOES 4
|
||||
BEGIN
|
||||
PROMPT 32 4 "Anno esercizio "
|
||||
@ -88,67 +79,16 @@ BEGIN
|
||||
MESSAGE COPY,H_ANNOES
|
||||
END
|
||||
|
||||
STRING F_TIPODOC 2
|
||||
STRING F_CODREG 3
|
||||
BEGIN
|
||||
PROMPT 32 5 "Tipo documento "
|
||||
FIELD LF_MOV->TIPODOC
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
STRING F_NUMDOC 7
|
||||
BEGIN
|
||||
PROMPT 57 5 "Documento n. "
|
||||
HELP "Numero del documento che ha generato il movimento"
|
||||
FIELD LF_MOV->NUMDOC
|
||||
WARNING "La causale o il saldaconto richiedono il numero documento"
|
||||
END
|
||||
|
||||
STRING F_DESCAGG 5
|
||||
BEGIN
|
||||
PROMPT 1 6 "Descrizione "
|
||||
HELP "Codice della descrizione del movimento"
|
||||
FLAGS "UZ"
|
||||
USE %DPN
|
||||
INPUT CODTAB F_DESCAGG
|
||||
DISPLAY "Codice" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT F_DESCAGG CODTAB
|
||||
OUTPUT F_DESCR S0
|
||||
CHECKTYPE NORMAL
|
||||
WARNING "Descrizione assente"
|
||||
END
|
||||
|
||||
STRING F_DESCR 50
|
||||
BEGIN
|
||||
PROMPT 25 6 ""
|
||||
HELP "Descrizione del movimento"
|
||||
FIELD LF_MOV->DESCR
|
||||
USE %DPN KEY 2
|
||||
INPUT S0 F_DESCR
|
||||
DISPLAY "Descrizione@50" S0
|
||||
DISPLAY "Codice" CODTAB
|
||||
COPY OUTPUT F_DESCAGG
|
||||
END
|
||||
|
||||
BOOLEAN F_SOLAIVA
|
||||
BEGIN
|
||||
PROMPT 1 7 "Movimento di sola IVA"
|
||||
HELP "Indicare se non vi sono righe di contabilita'"
|
||||
END
|
||||
|
||||
LIST F_PROVVISORIO 1 25
|
||||
BEGIN
|
||||
PROMPT 31 7 "Movimento provvisorio "
|
||||
HELP "Indicare se si tratta di movimento provvisorio"
|
||||
FIELD PROVVIS
|
||||
ITEM " |No (movimento normale)"
|
||||
ITEM "P|Si (cancellabile)"
|
||||
ITEM "N|Si (non cancellabile)"
|
||||
PROMPT 57 4 "Registro IVA "
|
||||
FLAGS "DGUZ"
|
||||
FIELD LF_MOV->REG
|
||||
END
|
||||
|
||||
STRING F_CODCAUS 3
|
||||
BEGIN
|
||||
PROMPT 1 8 "Causale "
|
||||
PROMPT 1 5 "Causale "
|
||||
HELP "Codice della causale generante l'operazione"
|
||||
FLAGS "UZ"
|
||||
FIELD LF_MOV->CODCAUS
|
||||
@ -169,7 +109,7 @@ END
|
||||
|
||||
STRING F_DESCRCAUS 50
|
||||
BEGIN
|
||||
PROMPT 25 8 ""
|
||||
PROMPT 25 5 ""
|
||||
HELP "Descrizione della causale generante l'operazione"
|
||||
USE LF_CAUSALI KEY 2 SELECT REG!=""
|
||||
INPUT DESCR F_DESCRCAUS
|
||||
@ -183,16 +123,76 @@ BEGIN
|
||||
ADD RUN cg0 -4
|
||||
END
|
||||
|
||||
STRING F_CODREG 3
|
||||
DATE F_DATADOC
|
||||
BEGIN
|
||||
PROMPT 1 9 "Registro IVA "
|
||||
FLAGS "DGUZ"
|
||||
FIELD LF_MOV->REG
|
||||
PROMPT 1 6 "Data documento "
|
||||
FIELD LF_MOV->DATADOC
|
||||
HELP "Data del documento che ha generato il movimento"
|
||||
WARNING "Inserire una data documento non superiore alla data dell'operazione"
|
||||
VALIDATE DATE_CMP_FUNC <= F_DATAREG
|
||||
END
|
||||
|
||||
STRING F_TIPODOC 2
|
||||
BEGIN
|
||||
PROMPT 32 6 "Tipo documento "
|
||||
FIELD LF_MOV->TIPODOC
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
STRING F_NUMDOC 7
|
||||
BEGIN
|
||||
PROMPT 57 6 "Documento n. "
|
||||
HELP "Numero del documento che ha generato il movimento"
|
||||
FIELD LF_MOV->NUMDOC
|
||||
WARNING "La causale o il saldaconto richiedono il numero documento"
|
||||
END
|
||||
|
||||
BOOLEAN F_SOLAIVA
|
||||
BEGIN
|
||||
PROMPT 1 7 "Movimento di sola IVA"
|
||||
HELP "Indicare se non vi sono righe di contabilita'"
|
||||
END
|
||||
|
||||
LIST F_PROVVISORIO 1 25
|
||||
BEGIN
|
||||
PROMPT 31 7 "Movimento provvisorio "
|
||||
HELP "Indicare se si tratta di movimento provvisorio"
|
||||
FIELD PROVVIS
|
||||
ITEM " |No (movimento normale)"
|
||||
ITEM "P|Si (cancellabile)"
|
||||
ITEM "N|Si (non cancellabile)"
|
||||
END
|
||||
|
||||
STRING F_DESCAGG 5
|
||||
BEGIN
|
||||
PROMPT 1 8 "Descrizione "
|
||||
HELP "Codice della descrizione del movimento"
|
||||
FLAGS "UZ"
|
||||
USE %DPN
|
||||
INPUT CODTAB F_DESCAGG
|
||||
DISPLAY "Codice" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT F_DESCAGG CODTAB
|
||||
OUTPUT F_DESCR S0
|
||||
CHECKTYPE NORMAL
|
||||
WARNING "Descrizione assente"
|
||||
END
|
||||
|
||||
STRING F_DESCR 50
|
||||
BEGIN
|
||||
PROMPT 25 8 ""
|
||||
HELP "Descrizione del movimento"
|
||||
FIELD LF_MOV->DESCR
|
||||
USE %DPN KEY 2
|
||||
INPUT S0 F_DESCR
|
||||
DISPLAY "Descrizione@50" S0
|
||||
DISPLAY "Codice" CODTAB
|
||||
COPY OUTPUT F_DESCAGG
|
||||
END
|
||||
|
||||
NUMBER F_PROTIVA 5
|
||||
BEGIN
|
||||
PROMPT 27 9 "Protocollo IVA "
|
||||
PROMPT 1 9 "Protocollo IVA "
|
||||
HELP "Numero progressivo di protocollo IVA"
|
||||
FIELD LF_MOV->PROTIVA
|
||||
END
|
||||
@ -463,7 +463,7 @@ END
|
||||
|
||||
NUMBER F_ANNORIF 4
|
||||
BEGIN
|
||||
PROMPT 45 15 "Rif.partita "
|
||||
PROMPT 50 15 "Rif.partita "
|
||||
FIELD LF_PARTITE->ANNO
|
||||
FLAGS "D"
|
||||
HELP "Anno di riferimento partita"
|
||||
@ -641,4 +641,4 @@ ENDMASK
|
||||
|
||||
#include "cg21iva.uml"
|
||||
#include "cg21cg.uml"
|
||||
#include "cg21rata.uml"
|
||||
#include "cg21rata.uml"
|
||||
|
@ -1319,7 +1319,15 @@ bool TPrimanota_application::datacomp_handler(TMask_field& f, KEY key)
|
||||
|
||||
if ((key == K_TAB && m.is_running()) || key == K_ENTER)
|
||||
{
|
||||
const TDate dc(f.get()); // Data di competenza
|
||||
const TDate dr(m.get(F_DATAREG)); // Data operazione
|
||||
|
||||
TString16 datacomp = f.get();
|
||||
if (datacomp.empty())
|
||||
{
|
||||
datacomp = dr.string();
|
||||
f.set(datacomp);
|
||||
}
|
||||
const TDate dc(datacomp); // Data di competenza
|
||||
const int ae = date2esc(dc); // Esercizio corrispondente
|
||||
|
||||
const char* data = "del 74/ter";
|
||||
@ -1331,7 +1339,6 @@ bool TPrimanota_application::datacomp_handler(TMask_field& f, KEY key)
|
||||
|
||||
if (ae)
|
||||
{
|
||||
const TDate dr(m.get(F_DATAREG)); // Data operazione
|
||||
int pr; // Esercizio precedente
|
||||
const int ar = date2esc(dr, &pr); // Esercizio in corso
|
||||
if (ae != ar && ae != pr)
|
||||
|
10
cg/cg2102.h
10
cg/cg2102.h
@ -21,7 +21,7 @@
|
||||
#include "cg2103.h"
|
||||
#endif
|
||||
|
||||
class Pagamento;
|
||||
class TPagamento;
|
||||
|
||||
class TPrimanota_application : public TRelation_application
|
||||
{
|
||||
@ -37,7 +37,7 @@ class TPrimanota_application : public TRelation_application
|
||||
TLocalisamfile* _comuni;
|
||||
TLocalisamfile* _occas;
|
||||
TLocalisamfile* _nditte;
|
||||
Pagamento* _pag;
|
||||
TPagamento* _pag;
|
||||
|
||||
TCausale* _causale; // Causale corrente
|
||||
TLibro_giornale* _giornale; // Libro giornale corrente
|
||||
@ -148,8 +148,6 @@ protected:
|
||||
TSheet_field& ivas() const;
|
||||
TSheet_field& pags() const;
|
||||
TArray* pag_rows() const { return _pag_rows; }
|
||||
Pagamento* pagamento() const;
|
||||
|
||||
|
||||
static int bill2pos(const TBill& conto, char tipo);
|
||||
static TipoIVA reg2IVA(const char* registro, int anno);
|
||||
@ -193,9 +191,9 @@ protected:
|
||||
void reset_cgs_row(int n) { reset_sheet_row(cgs(), n); }
|
||||
void reset_ivas_row(int n) { reset_sheet_row(ivas(), n); }
|
||||
|
||||
// skadenzarium
|
||||
Pagamento* pagamento() { return _pag; }
|
||||
TPagamento* pagamento() { return _pag; }
|
||||
void set_pagamento(const char* c, const char* d);
|
||||
void reset_pagamento();
|
||||
void set_scadenze(TMask& m);
|
||||
bool read_scadenze(const TMask& m);
|
||||
void write_scadenze(const TMask& m);
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
bool TPrimanota_application::pag_notify(int r, KEY k)
|
||||
{
|
||||
Pagamento* pag = app().pagamento();
|
||||
TPagamento* pag = app().pagamento();
|
||||
TSheet_field* ps = &(app().pags());
|
||||
TMask* msk = &(app().curr_mask());
|
||||
TArray* rws = app().pag_rows();
|
||||
@ -21,7 +21,6 @@ bool TPrimanota_application::pag_notify(int r, KEY k)
|
||||
// ts contiene la vecchia riga, ns la nuova
|
||||
TToken_string ts(36), ns(36);
|
||||
|
||||
|
||||
bool doit = TRUE, m_imp = FALSE, m_perc = FALSE, m_pag = FALSE;
|
||||
bool m_scad = FALSE, m_tipo = FALSE, mod = FALSE;
|
||||
word ahiahi = P_OK;
|
||||
@ -152,7 +151,7 @@ bool TPrimanota_application::codpag_handler(TMask_field& f, KEY key)
|
||||
void TPrimanota_application::set_pagamento(const char* c, const char* d)
|
||||
{
|
||||
if (_pag != NULL) delete _pag;
|
||||
_pag = new Pagamento(c,d);
|
||||
_pag = new TPagamento(c,d);
|
||||
}
|
||||
|
||||
void TPrimanota_application::set_scadenze(TMask& m)
|
||||
|
53
cg/cg21rata.uml
Executable file
53
cg/cg21rata.uml
Executable file
@ -0,0 +1,53 @@
|
||||
PAGE "Rata pagamento" -1 -1 50 7
|
||||
|
||||
DATE 101
|
||||
BEGIN
|
||||
PROMPT 1 2 "Scadenza "
|
||||
END
|
||||
|
||||
NUMBER 102 8 0
|
||||
BEGIN
|
||||
PROMPT 1 3 "Percentuale "
|
||||
END
|
||||
|
||||
NUMBER 103 15 0
|
||||
BEGIN
|
||||
PROMPT 1 4 "Importo "
|
||||
END
|
||||
|
||||
NUMBER 104 2 0
|
||||
BEGIN
|
||||
PROMPT 1 5 "Tipo pagamento "
|
||||
HELP ""
|
||||
SHEET "Codice|Tipo pagamento@32"
|
||||
INPUT 104
|
||||
OUTPUT 104
|
||||
OUTPUT 105
|
||||
ITEM "1|Rimessa diretta o contanti"
|
||||
ITEM "2|Tratta"
|
||||
ITEM "3|Ricevuta Bancaria"
|
||||
ITEM "4|Cessione"
|
||||
ITEM "5|Paghero'"
|
||||
ITEM "6|Lettera di credito"
|
||||
ITEM "7|Tratta accettata"
|
||||
ITEM "8|Altro pagamento"
|
||||
END
|
||||
|
||||
STRING 105 36
|
||||
BEGIN
|
||||
PROMPT 22 6 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
BUTTON DLG_CANCEL 10 2
|
||||
BEGIN
|
||||
PROMPT -12 -1 ""
|
||||
END
|
||||
|
||||
BUTTON DLG_OK 10 2
|
||||
BEGIN
|
||||
PROMPT -22 -1 ""
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
ENDMASK
|
75
cg/cg21sld.uml
Executable file
75
cg/cg21sld.uml
Executable file
@ -0,0 +1,75 @@
|
||||
PAGE "Registrazione Scadenze" -1 -1 77 20
|
||||
|
||||
GROUPBOX DLG_NULL 79 3
|
||||
BEGIN
|
||||
PROMPT 0 1 "@bScadenzario"
|
||||
END
|
||||
|
||||
NUMBER FS_IMPONIBILE 15
|
||||
BEGIN
|
||||
PROMPT 2 2 "Imponibile "
|
||||
PICTURE "."
|
||||
FLAGS "DR"
|
||||
END
|
||||
|
||||
NUMBER FS_IMPOSTA 15
|
||||
BEGIN
|
||||
PROMPT 29 2 "Imposta "
|
||||
PICTURE "."
|
||||
FLAGS "DR"
|
||||
END
|
||||
|
||||
NUMBER FS_SPESE 15
|
||||
BEGIN
|
||||
PROMPT 53 2 "Spese "
|
||||
PICTURE "."
|
||||
FLAGS "DR"
|
||||
END
|
||||
|
||||
|
||||
RADIOBUTTON FS_RDIFFER 31
|
||||
BEGIN
|
||||
PROMPT 1 4 "Opzioni ricalcolo rate"
|
||||
ITEM "1|Differenziate"
|
||||
ITEM "2|Uguali"
|
||||
ITEM "3|Uguali dall'ultima modificata"
|
||||
ITEM "4|Uguali finche' possibile"
|
||||
END
|
||||
|
||||
BOOLEAN FS_RECALC
|
||||
BEGIN
|
||||
PROMPT 53 5 "Ricalcolo automatico"
|
||||
MESSAGE TRUE ENABLE,FS_RDIFFER|ENABLE,FS_MCOMM
|
||||
MESSAGE FALSE DISABLE,FS_RDIFFER|DISABLE,FS_MCOMM
|
||||
END
|
||||
|
||||
BOOLEAN FS_MCOMM
|
||||
BEGIN
|
||||
PROMPT 53 6 "Mese commerciale"
|
||||
END
|
||||
|
||||
|
||||
STRING FS_NAMEPAG 27
|
||||
BEGIN
|
||||
PROMPT 36 7 "Pagamento "
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
STRING FS_TIPOPR 27
|
||||
BEGIN
|
||||
PROMPT 36 8 "Tipo prima rata "
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
SPREADSHEET FS_RATESHEET 80 8
|
||||
BEGIN
|
||||
PROMPT 1 10 "Rate"
|
||||
ITEM "Scadenza@10"
|
||||
ITEM "Percentuale@12"
|
||||
ITEM "Importo@15"
|
||||
ITEM "Tipo"
|
||||
ITEM "Pagamento@32"
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
132
cg/cg2200a.uml
132
cg/cg2200a.uml
@ -1,67 +1,65 @@
|
||||
#include "cg2200.h"
|
||||
|
||||
PAGE "Eliminazione Movimenti Provvisori" -1 -1 42 9
|
||||
|
||||
GROUPBOX DLG_NULL 40 3
|
||||
BEGIN
|
||||
PROMPT 1 1 "Dal movimento"
|
||||
END
|
||||
|
||||
DATE F_FROMDATE
|
||||
BEGIN
|
||||
PROMPT 2 2 "Data "
|
||||
HELP "Data del primo movimento provvisorio da eliminare"
|
||||
USE LF_MOV KEY 2 SELECT PROVVIS="P"
|
||||
INPUT DATAREG F_FROMDATE
|
||||
INPUT NUMREG F_FROMREG
|
||||
DISPLAY "Data@10" DATAREG
|
||||
DISPLAY "Numero@6" NUMREG
|
||||
DISPLAY "Causale" CODCAUS
|
||||
DISPLAY "Documento" NUMDOC
|
||||
DISPLAY "Descrizione@50" DESCR
|
||||
OUTPUT F_FROMDATE DATAREG
|
||||
OUTPUT F_FROMREG NUMREG
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
NUMBER F_FROMREG 5
|
||||
BEGIN
|
||||
PROMPT 22 2 "Operazione "
|
||||
FLAGS "DR"
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 40 3
|
||||
BEGIN
|
||||
PROMPT 1 4 "Al movimento"
|
||||
HELP "Data dell'ultimo movimento provvisorio da eliminare"
|
||||
END
|
||||
|
||||
DATE F_TODATE
|
||||
BEGIN
|
||||
PROMPT 2 5 "Data "
|
||||
COPY USE F_FROMDATE
|
||||
INPUT DATAREG F_TODATE
|
||||
INPUT NUMREG F_TOREG
|
||||
COPY DISPLAY F_FROMDATE
|
||||
OUTPUT F_TODATE DATAREG
|
||||
OUTPUT F_TOREG NUMREG
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
NUMBER F_TOREG 5
|
||||
BEGIN
|
||||
PROMPT 22 5 "Operazione "
|
||||
FLAGS "DR"
|
||||
END
|
||||
|
||||
BUTTON DLG_OK 10 2
|
||||
BEGIN
|
||||
PROMPT -12 -1 ""
|
||||
END
|
||||
|
||||
BUTTON DLG_QUIT 10 2
|
||||
BEGIN
|
||||
PROMPT -22 -1 ""
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
#include "cg2200.h"
|
||||
|
||||
PAGE "Eliminazione Movimenti Provvisori" -1 -1 42 9
|
||||
|
||||
GROUPBOX DLG_NULL 40 3
|
||||
BEGIN
|
||||
PROMPT 1 1 "Dal movimento"
|
||||
END
|
||||
|
||||
DATE F_FROMDATE
|
||||
BEGIN
|
||||
PROMPT 2 2 "Data "
|
||||
HELP "Data del primo movimento provvisorio da eliminare"
|
||||
USE LF_MOV KEY 2 SELECT PROVVIS="P"
|
||||
INPUT DATAREG F_FROMDATE
|
||||
INPUT NUMREG F_FROMREG
|
||||
DISPLAY "Data@10" DATAREG
|
||||
DISPLAY "Numero@6" NUMREG
|
||||
DISPLAY "Causale" CODCAUS
|
||||
DISPLAY "Documento" NUMDOC
|
||||
DISPLAY "Descrizione@50" DESCR
|
||||
OUTPUT F_FROMDATE DATAREG
|
||||
OUTPUT F_FROMREG NUMREG
|
||||
END
|
||||
|
||||
NUMBER F_FROMREG 5
|
||||
BEGIN
|
||||
PROMPT 22 2 "Operazione "
|
||||
FLAGS "DR"
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 40 3
|
||||
BEGIN
|
||||
PROMPT 1 4 "Al movimento"
|
||||
HELP "Data dell'ultimo movimento provvisorio da eliminare"
|
||||
END
|
||||
|
||||
DATE F_TODATE
|
||||
BEGIN
|
||||
PROMPT 2 5 "Data "
|
||||
COPY USE F_FROMDATE
|
||||
INPUT DATAREG F_TODATE
|
||||
INPUT NUMREG F_TOREG
|
||||
COPY DISPLAY F_FROMDATE
|
||||
OUTPUT F_TODATE DATAREG
|
||||
OUTPUT F_TOREG NUMREG
|
||||
END
|
||||
|
||||
NUMBER F_TOREG 5
|
||||
BEGIN
|
||||
PROMPT 22 5 "Operazione "
|
||||
FLAGS "DR"
|
||||
END
|
||||
|
||||
BUTTON DLG_OK 10 2
|
||||
BEGIN
|
||||
PROMPT -12 -1 ""
|
||||
END
|
||||
|
||||
BUTTON DLG_QUIT 10 2
|
||||
BEGIN
|
||||
PROMPT -22 -1 ""
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
@ -29,7 +29,7 @@ public:
|
||||
bool TCopia_archivi::copyfile(int logicnum, long from, long to)
|
||||
{
|
||||
if (from > 0) set_firm(from);
|
||||
else prefhndl->set("com");
|
||||
else prefix().set("com");
|
||||
TSystemisamfile file(logicnum);
|
||||
TFilename t; t.tempdir(); t << "/tr" << logicnum;
|
||||
|
||||
@ -81,8 +81,8 @@ void TCopia_archivi::clearivd(long to)
|
||||
|
||||
void TCopia_archivi::copyivd(long from, long to)
|
||||
{
|
||||
if (from > 0) set_firm(from);
|
||||
else prefhndl->set("com");
|
||||
if (from > 0) set_firm(from);
|
||||
else prefix().set("com");
|
||||
TLocalisamfile pcon(LF_PCON);
|
||||
TAssoc_array riclass;
|
||||
|
||||
@ -170,14 +170,14 @@ bool TCopia_archivi::menu(MENU_TAG)
|
||||
const bool copy_ivd = _msk->get_bool(F_IVD);
|
||||
if (copy_pcon || copy_causali || copy_clifo || copy_ivd)
|
||||
{
|
||||
if (prefhndl->exist(to_firm))
|
||||
if (prefix().exist(to_firm))
|
||||
{
|
||||
set_firm(to_firm);
|
||||
TLocalisamfile mov(LF_MOV);
|
||||
|
||||
if ((mov.eod() == 0) || (!copy_pcon && !copy_causali && !copy_clifo))
|
||||
{
|
||||
TString mess("Attenzione \n");
|
||||
TString256 mess("Attenzione \n");
|
||||
int count = 0;
|
||||
|
||||
if (copy_pcon)
|
||||
@ -234,7 +234,7 @@ bool TCopia_archivi::menu(MENU_TAG)
|
||||
else error_box("La copia si puo' effettuare solo se non sono stati registrati movimenti");
|
||||
set_firm(_default_firm);
|
||||
}
|
||||
else error_box("Gli archivi della ditta %d non sono stati ancora generati",to_firm);
|
||||
else error_box("Gli archivi della ditta %ld non sono stati ancora generati",to_firm);
|
||||
_msk->reset();
|
||||
}
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ bool TLiquidazione_app::user_create()
|
||||
_att_r = &(_nditte->curr(LF_ATTIV));
|
||||
|
||||
_ditte = new TArray_sheet(-1, -1, 0, 0, "Selezione Ditte",
|
||||
"@1|Cod.@5|Ragione Sociale@50|Vers.");
|
||||
"@1|Cod.@5R|Ragione Sociale@50|Vers.");
|
||||
_n_ditte = 0l;
|
||||
|
||||
// prevediamo la data che usera'; se calcola la liq. di un altro anno
|
||||
@ -436,7 +436,7 @@ void TLiquidazione_app::build_nomiditte(TProgind* pnd)
|
||||
for (dt.first(); !dt.eof(); dt.next())
|
||||
{
|
||||
// check no archivi
|
||||
bool good = prefhndl->exist(dt.get_long("CODDITTA"));
|
||||
bool good = prefix().exist(dt.get_long("CODDITTA"));
|
||||
|
||||
if (good)
|
||||
{
|
||||
@ -489,7 +489,7 @@ bool TLiquidazione_app::fr_ditt_handler(TMask_field& f, KEY key)
|
||||
(wht)m.get_int(CG43_RDB_VERS));
|
||||
|
||||
app().set_choice_limits(m);
|
||||
m.field(CG43_FLD_SELECTED).set(format("%ld", l));
|
||||
m.set(CG43_FLD_SELECTED, l);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -288,7 +288,7 @@ bool CG4400_application::mask_libun (TMask_field& f, KEY k)
|
||||
for (int i = 0; i < app()._ditte->items(); i++)
|
||||
{
|
||||
long ditta = app()._ditte->row(i).get_long(1);
|
||||
if (prefhndl->exist(ditta))
|
||||
if (prefix().exist(ditta))
|
||||
{
|
||||
app().set_firm(ditta);
|
||||
if (cod.not_empty())
|
||||
@ -625,7 +625,7 @@ void CG4400_application::build_nomiditte(TProgind* pnd)
|
||||
for (dt.first(); !dt.eof(); dt.next())
|
||||
{
|
||||
// check no archivi
|
||||
bool good = prefhndl->exist(dt.get_long("CODDITTA"));
|
||||
bool good = prefix().exist(dt.get_long("CODDITTA"));
|
||||
if (good)
|
||||
{
|
||||
// check no parametri liquidazione
|
||||
|
@ -1,12 +1,11 @@
|
||||
#include <confapp.h>
|
||||
#include <lffiles.h>
|
||||
#include <files.h>
|
||||
//#include <files.h>
|
||||
#include <isam.h>
|
||||
#include <tabutil.h>
|
||||
#include <attiv.h>
|
||||
#include "cg5100a.h"
|
||||
|
||||
class CG51_App : public TConfig_application
|
||||
class TParametri_ditta : public TConfig_application
|
||||
{
|
||||
bool _change_pcon;
|
||||
TString16 _val;
|
||||
@ -23,11 +22,11 @@ public:
|
||||
|
||||
virtual bool user_create();
|
||||
virtual bool user_destroy();
|
||||
CG51_App() : TConfig_application(CONFIG_DITTA) {}
|
||||
virtual ~CG51_App() {}
|
||||
TParametri_ditta() : TConfig_application(CONFIG_DITTA) {}
|
||||
virtual ~TParametri_ditta() {}
|
||||
};
|
||||
|
||||
bool CG51_App::user_create()
|
||||
bool TParametri_ditta::user_create()
|
||||
{
|
||||
_change_pcon = FALSE;
|
||||
|
||||
@ -46,7 +45,7 @@ bool CG51_App::user_create()
|
||||
}
|
||||
|
||||
|
||||
void CG51_App::check_registers(int year)
|
||||
void TParametri_ditta::check_registers(int year)
|
||||
{
|
||||
// controlla che per ogni data attivita' esistano almeno un registro
|
||||
// acquisti, vendite e giornale; warning appropriato in caso negativo
|
||||
@ -103,7 +102,7 @@ void CG51_App::check_registers(int year)
|
||||
|
||||
|
||||
|
||||
void CG51_App::swap_file(int logicnum, bool tocom)
|
||||
void TParametri_ditta::swap_file(int logicnum, bool tocom)
|
||||
{
|
||||
TDir dir;
|
||||
TString file(16);
|
||||
@ -128,7 +127,7 @@ void CG51_App::swap_file(int logicnum, bool tocom)
|
||||
}
|
||||
}
|
||||
|
||||
bool CG51_App::user_destroy()
|
||||
bool TParametri_ditta::user_destroy()
|
||||
{
|
||||
if (_change_pcon)
|
||||
{
|
||||
@ -139,7 +138,7 @@ bool CG51_App::user_destroy()
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool CG51_App::preprocess_config (TMask& mask, TConfig& config)
|
||||
bool TParametri_ditta::preprocess_config (TMask& mask, TConfig& config)
|
||||
{
|
||||
// these are disabled in normal applications
|
||||
TLocalisamfile mov(LF_MOV);
|
||||
@ -151,16 +150,40 @@ bool CG51_App::preprocess_config (TMask& mask, TConfig& config)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool CG51_App::postprocess_config(TMask& mask, TConfig& config)
|
||||
{
|
||||
bool TParametri_ditta::postprocess_config(TMask& mask, TConfig& config)
|
||||
{
|
||||
enable_menu_item(M_FILE_NEW);
|
||||
enable_menu_item(M_FILE_REVERT);
|
||||
|
||||
check_registers(mask.get_int(FLD_ANLIIV));
|
||||
if (mask.get_bool(CHK_GELIDI))
|
||||
{
|
||||
TLocalisamfile ditte(LF_NDITTE);
|
||||
const long ditta = get_firm();
|
||||
ditte.put("CODDITTA", ditta);
|
||||
ditte.read();
|
||||
if (ditte.get("DINIZIOATT").empty())
|
||||
return error_box("La gestione della liquidazione differita richiede "
|
||||
"la data di inizio attivita' sull'anagrafica della ditta.");
|
||||
|
||||
char freqiva = ditte.get_char("FREQVIVA");
|
||||
|
||||
TString16 key; key.format("%05ld%d", ditta, mask.get_int(FLD_ANLIIV));
|
||||
TTable lia("%LIA");
|
||||
lia.put("CODTAB", key);
|
||||
if (lia.read() == NOERR)
|
||||
freqiva = lia.get_char("S7");
|
||||
|
||||
if (freqiva != 'M')
|
||||
return error_box("La gestione della liquidazione differita richiede "
|
||||
"la frequenza dei versamenti IVA mensile.");
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool CG51_App::postprocess_config_changed(const char* par, const char* var,
|
||||
const char* oldv, const char* newv)
|
||||
bool TParametri_ditta::postprocess_config_changed(const char* par, const char* var,
|
||||
const char* oldv, const char* newv)
|
||||
{
|
||||
TString v(var);
|
||||
|
||||
@ -186,7 +209,7 @@ bool CG51_App::postprocess_config_changed(const char* par, const char* var,
|
||||
|
||||
int cg5100 (int argc, char* argv[])
|
||||
{
|
||||
CG51_App appc;
|
||||
TParametri_ditta appc;
|
||||
appc.run(argc, argv, "Parametri Ditta");
|
||||
return 0;
|
||||
}
|
||||
|
@ -53,3 +53,4 @@
|
||||
#define FLD_DCSUECE 152
|
||||
#define FLD_DCSPECE 153
|
||||
#define FLD_DESLIN 154
|
||||
#define FLD_DESLIC 155
|
@ -143,6 +143,19 @@ BEGIN
|
||||
FIELD CodLic
|
||||
END
|
||||
|
||||
STRING FLD_DESLIC 50 35
|
||||
BEGIN
|
||||
PROMPT 40 2 ""
|
||||
USE REG KEY 2 SELECT I0=5
|
||||
INPUT S0 FLD_DESLIC
|
||||
DISPLAY "Descrizione@50" S0
|
||||
DISPLAY "Anno" CODTAB[1,4]
|
||||
DISPLAY "Codice Registro" CODTAB[5,7]
|
||||
COPY OUTPUT FLD_CODLIC
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
|
||||
STRING FLD_CODLIN 1
|
||||
BEGIN
|
||||
PROMPT 1 3 "Codice lingua "
|
||||
|
@ -122,7 +122,9 @@ bool TRipristina_stampa::reg_restore(const TString& regist,
|
||||
{
|
||||
p.addstatus(1);
|
||||
mov.read(_isequal, _lock);
|
||||
mov.zero(fieldname); // Azzera flag STAMPATO o REGST
|
||||
mov.zero(fieldname); // Azzera flag STAMPATO o REGST
|
||||
// if (giornale) mov.zero(MOV_NUMGIO); // Azzera numero riferimento giornale
|
||||
|
||||
ok = (mov.rewrite() == NOERR);
|
||||
if (!ok)
|
||||
error_box("Errore nell'aggiornamento del movimento %ld.\n Errore n. %d",
|
||||
@ -130,7 +132,7 @@ bool TRipristina_stampa::reg_restore(const TString& regist,
|
||||
}
|
||||
|
||||
--d;
|
||||
if (d > inizio_anno) // Aggiorna data ultima stampa
|
||||
if (d > inizio_anno) // Aggiorna data ultima stampa
|
||||
{
|
||||
reg.put("D3", d); // Data ultima stampa
|
||||
if (!giornale)
|
||||
|
@ -1,25 +1,25 @@
|
||||
#include "pagament.h"
|
||||
#include <utility.h>
|
||||
|
||||
int Pagamento::_rata_ifield(int n, int f) const
|
||||
int TPagamento::_rata_ifield(int n, int f) const
|
||||
{
|
||||
TToken_string& t = (TToken_string&)_rate[n];
|
||||
return t.get_int(f);
|
||||
}
|
||||
|
||||
real Pagamento::_rata_rfield(int n, int f) const
|
||||
real TPagamento::_rata_rfield(int n, int f) const
|
||||
{
|
||||
TToken_string& t = (TToken_string&)_rate[n];
|
||||
return real(t.get(f));
|
||||
}
|
||||
|
||||
TDate Pagamento::_rata_dfield(int n, int f) const
|
||||
TDate TPagamento::_rata_dfield(int n, int f) const
|
||||
{
|
||||
TToken_string& t = (TToken_string&)_rate[n];
|
||||
return TDate(t.get(f));
|
||||
}
|
||||
|
||||
const char* Pagamento::_rata_sfield(int n, int f) const
|
||||
const char* TPagamento::_rata_sfield(int n, int f) const
|
||||
{
|
||||
static char kak[6];
|
||||
TToken_string& t = (TToken_string&)_rate[n];
|
||||
@ -28,7 +28,7 @@ const char* Pagamento::_rata_sfield(int n, int f) const
|
||||
}
|
||||
|
||||
|
||||
bool Pagamento::ratapagata(int n)
|
||||
bool TPagamento::ratapagata(int n)
|
||||
{
|
||||
TToken_string& t = (TToken_string&)_rate[n];
|
||||
return t.items() > 6;
|
||||
@ -36,7 +36,7 @@ bool Pagamento::ratapagata(int n)
|
||||
|
||||
|
||||
|
||||
void Pagamento::set_intervallo_rate(int in)
|
||||
void TPagamento::set_intervallo_rate(int in)
|
||||
{
|
||||
_dirty = TRUE;
|
||||
if (_mcomm && (in % 30) != 0)
|
||||
@ -49,7 +49,7 @@ void Pagamento::set_intervallo_rate(int in)
|
||||
}
|
||||
}
|
||||
|
||||
void Pagamento::set_mese_commerciale(bool v, int& sscad)
|
||||
void TPagamento::set_mese_commerciale(bool v, int& sscad)
|
||||
{
|
||||
_dirty = FALSE;
|
||||
if (_mcomm == v) return;
|
||||
@ -61,7 +61,7 @@ void Pagamento::set_mese_commerciale(bool v, int& sscad)
|
||||
_mcomm = v;
|
||||
}
|
||||
|
||||
void Pagamento::set_rate_differenziate(int v)
|
||||
void TPagamento::set_rate_differenziate(int v)
|
||||
{
|
||||
_dirty = FALSE;
|
||||
if (!_rdiff && v == 2) return;
|
||||
@ -79,7 +79,7 @@ void Pagamento::set_rate_differenziate(int v)
|
||||
}
|
||||
}
|
||||
|
||||
void Pagamento::set_tipo_prima_rata(int v, int sscad)
|
||||
void TPagamento::set_tipo_prima_rata(int v, int sscad)
|
||||
{
|
||||
_dirty = FALSE;
|
||||
if (_tpr == v) return;
|
||||
@ -118,7 +118,7 @@ void Pagamento::set_tipo_prima_rata(int v, int sscad)
|
||||
_dirty = TRUE;
|
||||
}
|
||||
|
||||
void Pagamento::set_numero_rate(int n, int sscad)
|
||||
void TPagamento::set_numero_rate(int n, int sscad)
|
||||
{
|
||||
_dirty = FALSE;
|
||||
if (n == 0 || n == n_rate()) return;
|
||||
@ -146,7 +146,7 @@ void Pagamento::set_numero_rate(int n, int sscad)
|
||||
}
|
||||
|
||||
|
||||
void Pagamento::next_scad(TDate& d, int scad, bool mcomm, int rata)
|
||||
void TPagamento::next_scad(TDate& d, int scad, bool mcomm, int rata)
|
||||
{
|
||||
if (mcomm)
|
||||
{
|
||||
@ -183,7 +183,7 @@ void Pagamento::next_scad(TDate& d, int scad, bool mcomm, int rata)
|
||||
}
|
||||
|
||||
|
||||
void Pagamento::remove_rata(int i)
|
||||
void TPagamento::remove_rata(int i)
|
||||
{
|
||||
// non fa nessun ricalcolo, si limita ad impacchettare se
|
||||
// necessario
|
||||
@ -192,7 +192,7 @@ void Pagamento::remove_rata(int i)
|
||||
_dirty = TRUE;
|
||||
}
|
||||
|
||||
TToken_string& Pagamento::add_rata(real perc, int day, int type)
|
||||
TToken_string& TPagamento::add_rata(real perc, int day, int type)
|
||||
{
|
||||
TToken_string* tt = new TToken_string(16);
|
||||
tt->add(day); // scadenza
|
||||
@ -206,7 +206,7 @@ TToken_string& Pagamento::add_rata(real perc, int day, int type)
|
||||
return *tt;
|
||||
}
|
||||
|
||||
TToken_string& Pagamento::set_rata (int index, real perc, int day, int type,
|
||||
TToken_string& TPagamento::set_rata (int index, real perc, int day, int type,
|
||||
const char* ulc, const char* imp,
|
||||
const char* data)
|
||||
{
|
||||
@ -236,7 +236,7 @@ TToken_string& Pagamento::set_rata (int index, real perc, int day, int type,
|
||||
return *tt;
|
||||
}
|
||||
|
||||
void Pagamento::set_imprata(int i, real r)
|
||||
void TPagamento::set_imprata(int i, real r)
|
||||
{
|
||||
TToken_string& tt = (TToken_string&)_rate[i];
|
||||
TDate d = _inizio;
|
||||
@ -248,7 +248,7 @@ void Pagamento::set_imprata(int i, real r)
|
||||
tt.add(r.string(), 4);
|
||||
}
|
||||
|
||||
TToken_string& Pagamento::set_rata(int index, real howmuch,
|
||||
TToken_string& TPagamento::set_rata(int index, real howmuch,
|
||||
TDate& date, int type,const char* ulc, bool pagato)
|
||||
{
|
||||
// calcola percentuali e scadenze a partire dagli importi
|
||||
@ -290,7 +290,7 @@ TToken_string& Pagamento::set_rata(int index, real howmuch,
|
||||
|
||||
|
||||
|
||||
word Pagamento::validate() const
|
||||
word TPagamento::validate() const
|
||||
{
|
||||
word res = 0x0000;
|
||||
real r(0.0);
|
||||
@ -338,7 +338,7 @@ word Pagamento::validate() const
|
||||
}
|
||||
|
||||
|
||||
void Pagamento::strerr(word err, TString& s)
|
||||
void TPagamento::strerr(word err, TString& s)
|
||||
{
|
||||
s = "Errore:";
|
||||
if (err & P_RSUM)
|
||||
@ -351,7 +351,7 @@ void Pagamento::strerr(word err, TString& s)
|
||||
s << "\n La prima rata e' antecedente alla data movimento";
|
||||
}
|
||||
|
||||
const char* Pagamento::desc_tpr() const
|
||||
const char* TPagamento::desc_tpr() const
|
||||
{
|
||||
const char* o;
|
||||
switch (_tpr)
|
||||
@ -367,7 +367,7 @@ const char* Pagamento::desc_tpr() const
|
||||
return o;
|
||||
}
|
||||
|
||||
const char* Pagamento::desc_tipo(int i) const
|
||||
const char* TPagamento::desc_tipo(int i) const
|
||||
{
|
||||
const char* o;
|
||||
switch (i)
|
||||
@ -384,7 +384,7 @@ const char* Pagamento::desc_tipo(int i) const
|
||||
return o;
|
||||
}
|
||||
|
||||
word Pagamento::recalc_rate(int row, bool is_perc_modified,
|
||||
word TPagamento::recalc_rate(int row, bool is_perc_modified,
|
||||
const char* new_value, const char* scad,
|
||||
const char* typ, int rdiff, bool mcomm,
|
||||
bool& need_recalc)
|
||||
@ -690,7 +690,7 @@ word Pagamento::recalc_rate(int row, bool is_perc_modified,
|
||||
}
|
||||
|
||||
|
||||
bool Pagamento::read(TTable* t, TTable* r)
|
||||
bool TPagamento::read(TTable* t, TTable* r)
|
||||
{
|
||||
// puo' chiamarla chiunque
|
||||
bool istnew = FALSE;
|
||||
@ -754,7 +754,7 @@ bool Pagamento::read(TTable* t, TTable* r)
|
||||
}
|
||||
|
||||
|
||||
int Pagamento::write(TTable& r)
|
||||
int TPagamento::write(TTable& r)
|
||||
{
|
||||
// Scrive soltanto le righe di pagamento; si assume sia stata chiamata da una
|
||||
// relapp, che ha scritto il file principale
|
||||
@ -773,7 +773,7 @@ int Pagamento::write(TTable& r)
|
||||
return err;
|
||||
}
|
||||
|
||||
int Pagamento::rewrite(TTable& r)
|
||||
int TPagamento::rewrite(TTable& r)
|
||||
{
|
||||
TString s(16); int err = NOERR;
|
||||
for (int i = 0; err == NOERR && i < n_rate(); i++)
|
||||
@ -800,7 +800,7 @@ int Pagamento::rewrite(TTable& r)
|
||||
return err;
|
||||
}
|
||||
|
||||
int Pagamento::remove(TTable& r)
|
||||
int TPagamento::remove(TTable& r)
|
||||
{
|
||||
TString s(16); int err = NOERR;
|
||||
for (int i = 0 ; err == NOERR; i++)
|
||||
@ -813,7 +813,7 @@ int Pagamento::remove(TTable& r)
|
||||
return err;
|
||||
}
|
||||
|
||||
void Pagamento::set_rate_auto()
|
||||
void TPagamento::set_rate_auto()
|
||||
{
|
||||
// vedi rate esistenti e tipo prima rata
|
||||
// deve fare riferimento ad un tipo pagamento esistente
|
||||
@ -842,7 +842,7 @@ void Pagamento::set_rate_auto()
|
||||
|
||||
|
||||
|
||||
void Pagamento::set_total(real& imponibile, real& imposta, real& spese)
|
||||
void TPagamento::set_total(real& imponibile, real& imposta, real& spese)
|
||||
{
|
||||
_imponibile = imponibile;
|
||||
_imposta = imposta;
|
||||
@ -895,7 +895,7 @@ void Pagamento::set_total(real& imponibile, real& imposta, real& spese)
|
||||
}
|
||||
|
||||
|
||||
void Pagamento::set_sheet(TSheet_field& sf, int sscad)
|
||||
void TPagamento::set_sheet(TSheet_field& sf, int sscad)
|
||||
{
|
||||
sf.reset();
|
||||
if (_inited && _rate.items() > 0)
|
||||
@ -968,7 +968,7 @@ void Pagamento::set_sheet(TSheet_field& sf, int sscad)
|
||||
sf.force_update();
|
||||
}
|
||||
|
||||
Pagamento::Pagamento(const char* codtab, const char* data) :
|
||||
TPagamento::TPagamento(const char* codtab, const char* data) :
|
||||
_slicer(0.0,0), _new(FALSE), _imponibile(0.0), _imposta(0.0),
|
||||
_spese(0.0), _code(codtab), _dirty(FALSE), _inited(FALSE)
|
||||
{
|
||||
|
@ -1,18 +1,6 @@
|
||||
#ifndef __PAGAMENT_H
|
||||
#define __PAGAMENT_H
|
||||
|
||||
#ifndef __REAL_H
|
||||
#include <real.h>
|
||||
#endif
|
||||
|
||||
#ifndef __STRINGS_H
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#ifndef __DATE_H
|
||||
#include <date.h>
|
||||
#endif
|
||||
|
||||
#ifndef __MSKSHEET_H
|
||||
#include <msksheet.h>
|
||||
#endif
|
||||
@ -28,7 +16,7 @@ const word P_IMPNC = 0x0002; // inconsistenza percentuali / importi
|
||||
const word P_SCAD = 0x0004; // scadenze non consecutive
|
||||
const word P_INIZIO = 0x0008; // data 1a rata < data inizio pagamenti
|
||||
|
||||
class Pagamento : public TObject
|
||||
class TPagamento : public TObject
|
||||
{
|
||||
TString _code; // codice
|
||||
TString _name; // descrizione
|
||||
@ -141,8 +129,8 @@ public:
|
||||
|
||||
// se codtab non e' NULL legge da file (e da' errore se non c'e')
|
||||
// se si vuole fare un pagamento nuovo si da' il codice con set_code
|
||||
Pagamento(const char* codtab = NULL, const char* data = NULL);
|
||||
virtual ~Pagamento() {}
|
||||
TPagamento(const char* codtab = NULL, const char* data = NULL);
|
||||
virtual ~TPagamento() {}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user