Aumentate ad uno sproposito di colonne tutte le stampe relative
alla contabilita'. cglib01.cpp Cambiato il campo TIPOAPERS in TIPOPER per stabilire il tipo di anagrafica nell'oggetto TBill git-svn-id: svn://10.65.10.50/trunk@5400 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
8be687cf30
commit
66fe24764c
@ -48,7 +48,6 @@ END
|
||||
DATE F_DATAREG
|
||||
BEGIN
|
||||
PROMPT 1 3 "Data operazione "
|
||||
HELP "Data in cui viene effettuata l'operazione"
|
||||
FIELD DATAREG
|
||||
CHECKTYPE REQUIRED
|
||||
MESSAGE COPY,K_DATAREG
|
||||
@ -58,7 +57,6 @@ END
|
||||
DATE F_DATACOMP
|
||||
BEGIN
|
||||
PROMPT 1 4 "Data di competenza "
|
||||
HELP "Data di competenza dell'operazione"
|
||||
FIELD DATACOMP
|
||||
MESSAGE COPY,K_DATACOMP
|
||||
// DATACOMP NEW WAY
|
||||
@ -76,7 +74,6 @@ END
|
||||
STRING F_CODCAUS 3
|
||||
BEGIN
|
||||
PROMPT 1 5 "Causale "
|
||||
HELP "Codice della causale generante l'operazione"
|
||||
FLAGS "UZ"
|
||||
FIELD CODCAUS
|
||||
USE LF_CAUSALI
|
||||
@ -96,7 +93,6 @@ END
|
||||
STRING F_DESCRCAUS 50
|
||||
BEGIN
|
||||
PROMPT 25 5 ""
|
||||
HELP "Descrizione della causale generante l'operazione"
|
||||
USE LF_CAUSALI KEY 2
|
||||
INPUT DESCR F_DESCRCAUS
|
||||
DISPLAY "Descrizione@50" DESCR
|
||||
@ -108,7 +104,6 @@ END
|
||||
LIST F_PROVVISORIO 1 24
|
||||
BEGIN
|
||||
PROMPT 1 6 "Movimento provvisorio "
|
||||
HELP "Indicare se si tratta di movimento provvisorio"
|
||||
FIELD PROVVIS
|
||||
ITEM " |No (movimento normale)"
|
||||
ITEM "P|Si (cancellabile)"
|
||||
@ -126,7 +121,6 @@ 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
|
||||
@ -136,7 +130,6 @@ END
|
||||
STRING F_NUMDOC 7
|
||||
BEGIN
|
||||
PROMPT 56 7 "Documento n. "
|
||||
HELP "Numero del documento generante il movimento"
|
||||
FIELD NUMDOC
|
||||
FLAGS "U"
|
||||
WARNING "La causale impone di specificare il numero documento"
|
||||
@ -151,7 +144,6 @@ 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
|
||||
@ -165,7 +157,6 @@ 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
|
||||
@ -183,7 +174,6 @@ END
|
||||
STRING SK_VALUTA 3
|
||||
BEGIN
|
||||
PROMPT 2 11 "Valuta "
|
||||
HELP "Codice della valuta per movimento"
|
||||
FIELD CODVAL
|
||||
FLAGS "UZ"
|
||||
GROUP 3 5
|
||||
@ -223,7 +213,7 @@ BEGIN
|
||||
WARNING "E' stata specificata una valuta senza il cambio relativo"
|
||||
END
|
||||
|
||||
NUMBER F_TOTALE 15
|
||||
NUMBER F_TOTALE 18
|
||||
BEGIN
|
||||
PROMPT 2 12 "Importo movimento "
|
||||
PICTURE "."
|
||||
@ -233,10 +223,9 @@ BEGIN
|
||||
MESSAGE COPY,K_TOTALE
|
||||
END
|
||||
|
||||
NUMBER SK_TOTDOCVAL 15 3
|
||||
NUMBER SK_TOTDOCVAL 18 3
|
||||
BEGIN
|
||||
PROMPT 44 12 "Totale in valuta "
|
||||
HELP ""
|
||||
PICTURE ".3"
|
||||
GROUP 3 5
|
||||
VALIDATE REQIF_FUNC 1 F_TOTALE
|
||||
@ -318,17 +307,17 @@ BEGIN
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
NUMBER K_TOTALE 15
|
||||
NUMBER K_TOTALE 18
|
||||
BEGIN
|
||||
PROMPT 1 7 "Imp. movimento "
|
||||
PROMPT 1 7 "Imp. mov. "
|
||||
PICTURE "."
|
||||
FLAGS "D"
|
||||
GROUP 5
|
||||
END
|
||||
|
||||
NUMBER K_RESIDUO 15
|
||||
NUMBER K_RESIDUO 18
|
||||
BEGIN
|
||||
PROMPT 33 7 "Residuo "
|
||||
PROMPT 32 7 "Residuo "
|
||||
PICTURE "."
|
||||
FLAGS "D"
|
||||
GROUP 5
|
||||
@ -345,8 +334,8 @@ END
|
||||
SPREADSHEET F_SHEETCG 0 -2
|
||||
BEGIN
|
||||
PROMPT 0 8 ""
|
||||
ITEM "Dare@15F"
|
||||
ITEM "Avere@15F"
|
||||
ITEM "Dare@18F"
|
||||
ITEM "Avere@18F"
|
||||
ITEM "CF@2"
|
||||
ITEM "Gr."
|
||||
ITEM "Co."
|
||||
@ -363,14 +352,14 @@ BEGIN
|
||||
ITEM "Tipo@4"
|
||||
END
|
||||
|
||||
NUMBER F_DARE 15
|
||||
NUMBER F_DARE 18
|
||||
BEGIN
|
||||
PROMPT 1 -1 "Sbilancio Dare "
|
||||
FLAGS "DRV"
|
||||
PICTURE "."
|
||||
END
|
||||
|
||||
NUMBER F_AVERE 15
|
||||
NUMBER F_AVERE 18
|
||||
BEGIN
|
||||
PROMPT 41 -1 "Sbilancio Avere "
|
||||
FLAGS "DRV"
|
||||
|
@ -445,16 +445,16 @@ BEGIN
|
||||
WARNING "Inserire il cambio o eliminare il codice valuta"
|
||||
END
|
||||
|
||||
NUMBER F_TOTALE 15
|
||||
NUMBER F_TOTALE 18
|
||||
BEGIN
|
||||
PROMPT 1 14 "Totale documento "
|
||||
FIELD TOTDOC
|
||||
PICTURE "."
|
||||
END
|
||||
|
||||
NUMBER SK_TOTDOCVAL 15 3
|
||||
NUMBER SK_TOTDOCVAL 18 3
|
||||
BEGIN
|
||||
PROMPT 35 14 "Tot. in valuta "
|
||||
PROMPT 38 14 "in valuta "
|
||||
FIELD TOTDOCVAL
|
||||
GROUP 3
|
||||
PICTURE ".3"
|
||||
@ -477,7 +477,7 @@ BEGIN
|
||||
WARNING "Codice IVA assente"
|
||||
END
|
||||
|
||||
NUMBER F_RITFIS 15
|
||||
NUMBER F_RITFIS 18
|
||||
BEGIN
|
||||
PROMPT 1 15 "Ritenute fiscali "
|
||||
FIELD RITFIS
|
||||
@ -485,7 +485,7 @@ BEGIN
|
||||
PICTURE "."
|
||||
END
|
||||
|
||||
NUMBER F_RITSOC 15
|
||||
NUMBER F_RITSOC 18
|
||||
BEGIN
|
||||
PROMPT 1 16 "Ritenute sociali "
|
||||
FIELD RITSOC
|
||||
@ -537,25 +537,23 @@ NUMBER F_CAMBIOINTRA 15 5
|
||||
BEGIN
|
||||
PROMPT 39 17 "Cambio intracomun. "
|
||||
FIELD CAMBIOI
|
||||
FLAGS "RU"
|
||||
FLAGS "U"
|
||||
GROUP 4
|
||||
PICTURE ".5"
|
||||
END
|
||||
|
||||
NUMBER F_CORRLIRE 15
|
||||
NUMBER F_CORRLIRE 18
|
||||
BEGIN
|
||||
PROMPT 1 18 "Corrispett. Lire "
|
||||
FIELD CORRLIRE
|
||||
FLAGS "R"
|
||||
PICTURE "."
|
||||
GROUP 4
|
||||
END
|
||||
|
||||
NUMBER F_CORRVALUTA 15 3
|
||||
NUMBER F_CORRVALUTA 18 3
|
||||
BEGIN
|
||||
PROMPT 39 18 "Corrispettivo valuta "
|
||||
PROMPT 39 18 "Corrispet. valuta "
|
||||
FIELD CORRVALUTA
|
||||
FLAGS "R"
|
||||
PICTURE ".3"
|
||||
GROUP 4
|
||||
VALIDATE REQIF_FUNC 1 F_VALUTAINTRA
|
||||
@ -603,10 +601,10 @@ END
|
||||
SPREADSHEET F_SHEETIVA 0 6
|
||||
BEGIN
|
||||
PROMPT 0 4 ""
|
||||
ITEM "Imponibile@15"
|
||||
ITEM "Imponibile@18"
|
||||
ITEM "Iva@5"
|
||||
ITEM "Det@1"
|
||||
ITEM "Imposta@15"
|
||||
ITEM "Imposta@18"
|
||||
ITEM "CR@1"
|
||||
ITEM "CF@1"
|
||||
ITEM "Gr."
|
||||
@ -615,14 +613,14 @@ BEGIN
|
||||
ITEM "Descrizione Conto@50"
|
||||
END
|
||||
|
||||
NUMBER F_IMPONIBILI 15
|
||||
NUMBER F_IMPONIBILI 18
|
||||
BEGIN
|
||||
PROMPT 1 11 "Totale imponibili "
|
||||
FLAGS "DV"
|
||||
PICTURE "."
|
||||
END
|
||||
|
||||
NUMBER F_IMPOSTE 15
|
||||
NUMBER F_IMPOSTE 18
|
||||
BEGIN
|
||||
PROMPT 41 11 "Totale imposte "
|
||||
FLAGS "DV"
|
||||
@ -632,8 +630,8 @@ END
|
||||
SPREADSHEET F_SHEETCG 0 -2
|
||||
BEGIN
|
||||
PROMPT 0 12 ""
|
||||
ITEM "Dare@15F"
|
||||
ITEM "Avere@15F"
|
||||
ITEM "Dare@18F"
|
||||
ITEM "Avere@18F"
|
||||
ITEM "C/F@1"
|
||||
ITEM "Gr."
|
||||
ITEM "Co."
|
||||
@ -650,14 +648,14 @@ BEGIN
|
||||
ITEM "Tipo@4"
|
||||
END
|
||||
|
||||
NUMBER F_DARE 15
|
||||
NUMBER F_DARE 18
|
||||
BEGIN
|
||||
PROMPT 1 -1 "Sbilancio Dare "
|
||||
FLAGS "DRV"
|
||||
PICTURE "."
|
||||
END
|
||||
|
||||
NUMBER F_AVERE 15
|
||||
NUMBER F_AVERE 18
|
||||
BEGIN
|
||||
PROMPT 41 -1 "Sbilancio Avere "
|
||||
FLAGS "DRV"
|
||||
|
@ -5,12 +5,13 @@ TOOLBAR "" 0 20 0 2
|
||||
BUTTON DLG_OK 10 2
|
||||
BEGIN
|
||||
PROMPT -12 -11 ""
|
||||
PICTURE BMP_OK
|
||||
END
|
||||
|
||||
BUTTON P_NUOVO 10 2
|
||||
BEGIN
|
||||
PROMPT -22 -11 "~Nuovo"
|
||||
PICTURE 105
|
||||
PICTURE BMP_NEWREC
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
@ -64,20 +65,20 @@ END
|
||||
|
||||
STRING P_NUMERO 7
|
||||
BEGIN
|
||||
PROMPT 16 3 ""
|
||||
PROMPT 15 3 ""
|
||||
FLAGS "U"
|
||||
END
|
||||
|
||||
NUMBER P_RESIDUO 15
|
||||
NUMBER P_RESIDUO 18
|
||||
BEGIN
|
||||
PROMPT 30 3 "Residuo "
|
||||
PROMPT 25 3 "Residuo "
|
||||
FLAGS "D"
|
||||
PICTURE "."
|
||||
END
|
||||
|
||||
NUMBER P_RESIDUOVAL 15 3
|
||||
NUMBER P_RESIDUOVAL 18 3
|
||||
BEGIN
|
||||
PROMPT 56 3 ""
|
||||
PROMPT 53 3 ""
|
||||
FLAGS "D"
|
||||
PICTURE ".3"
|
||||
END
|
||||
@ -105,8 +106,8 @@ BEGIN
|
||||
ITEM "Data doc.@10"
|
||||
ITEM "Data scad."
|
||||
ITEM "Descrizione@20"
|
||||
ITEM "Importo Lire@14"
|
||||
ITEM "Importo Valuta@14"
|
||||
ITEM "Importo Lire@16"
|
||||
ITEM "Importo Valuta@16"
|
||||
ITEM "Num. op. "
|
||||
ITEM "Data op.@10"
|
||||
ITEM "Num. doc."
|
||||
@ -156,25 +157,25 @@ BEGIN
|
||||
PROMPT 1 5 "Numero documento "
|
||||
END
|
||||
|
||||
STRING 106 14
|
||||
STRING 106 16
|
||||
BEGIN
|
||||
PROMPT 34 2 "Documenti "
|
||||
FLAGS "R"
|
||||
END
|
||||
|
||||
STRING 107 14
|
||||
STRING 107 16
|
||||
BEGIN
|
||||
PROMPT 34 3 "Pagamenti "
|
||||
FLAGS "R"
|
||||
END
|
||||
|
||||
STRING 108 14
|
||||
STRING 108 16
|
||||
BEGIN
|
||||
PROMPT 34 4 "Altri importi "
|
||||
FLAGS "R"
|
||||
END
|
||||
|
||||
STRING 105 14
|
||||
STRING 105 16
|
||||
BEGIN
|
||||
PROMPT 34 5 "Saldo "
|
||||
FLAGS "R"
|
||||
|
@ -7,6 +7,7 @@ TOOLBAR "" 0 20 0 2
|
||||
BUTTON DLG_OK 10 2
|
||||
BEGIN
|
||||
PROMPT -13 -11 "Conferma"
|
||||
PICTURE BMP_OK
|
||||
END
|
||||
|
||||
BUTTON DLG_DELREC 10 2
|
||||
@ -65,14 +66,14 @@ BEGIN
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
NUMBER S_IMPORTO_SCAD 15
|
||||
NUMBER S_IMPORTO_SCAD 18
|
||||
BEGIN
|
||||
PROMPT 18 4 "Importo "
|
||||
PICTURE "."
|
||||
FLAGS "DR"
|
||||
END
|
||||
|
||||
NUMBER S_IMPORTOVAL_SCAD 15 3
|
||||
NUMBER S_IMPORTOVAL_SCAD 18 3
|
||||
BEGIN
|
||||
PROMPT 43 4 "Importo in valuta "
|
||||
PICTURE ".3"
|
||||
@ -80,14 +81,14 @@ BEGIN
|
||||
GROUP 3
|
||||
END
|
||||
|
||||
NUMBER S_RESIDUOPAG 15
|
||||
NUMBER S_RESIDUOPAG 18
|
||||
BEGIN
|
||||
PROMPT 2 5 "Residuo pagamento "
|
||||
PICTURE "."
|
||||
FLAGS "DR"
|
||||
END
|
||||
|
||||
NUMBER S_RESIDUORATA 15
|
||||
NUMBER S_RESIDUORATA 18
|
||||
BEGIN
|
||||
PROMPT 48 5 "Residuo rata "
|
||||
PICTURE "."
|
||||
@ -99,7 +100,7 @@ BEGIN
|
||||
PROMPT 1 7 "@BPagamento"
|
||||
END
|
||||
|
||||
NUMBER S_IMPORTO 15
|
||||
NUMBER S_IMPORTO 18
|
||||
BEGIN
|
||||
PROMPT 2 8 "Importo pagamento "
|
||||
PICTURE "."
|
||||
@ -108,15 +109,15 @@ BEGIN
|
||||
WARNING "L'importo deve essere specificato"
|
||||
END
|
||||
|
||||
NUMBER S_RITENUTE 15
|
||||
NUMBER S_RITENUTE 18
|
||||
BEGIN
|
||||
PROMPT 38 8 "Ritenute professionali "
|
||||
PROMPT 41 8 "Ritenute profess. "
|
||||
PICTURE "."
|
||||
FIELD RITENUTE
|
||||
MESSAGE DIRTY,S_IMPORTO|K_TAB,S_IMPORTO
|
||||
END
|
||||
|
||||
NUMBER S_IMPORTOVAL 15 3
|
||||
NUMBER S_IMPORTOVAL 18 3
|
||||
BEGIN
|
||||
PROMPT 2 9 "Importo in valuta "
|
||||
PICTURE ".3"
|
||||
|
@ -34,17 +34,17 @@ BEGIN
|
||||
PROMPT 1 4 "Conto principale"
|
||||
END
|
||||
|
||||
NUMBER CG_DARE 15
|
||||
NUMBER CG_DARE 18
|
||||
BEGIN
|
||||
PROMPT 2 5 "Dare "
|
||||
FLAGS "RV"
|
||||
FLAGS "V"
|
||||
PICTURE "."
|
||||
END
|
||||
|
||||
NUMBER CG_AVERE 15
|
||||
NUMBER CG_AVERE 18
|
||||
BEGIN
|
||||
PROMPT 43 5 "Avere "
|
||||
FLAGS "RV"
|
||||
PROMPT 38 5 "Avere "
|
||||
FLAGS "V"
|
||||
PICTURE "."
|
||||
END
|
||||
|
||||
|
@ -49,19 +49,18 @@ BEGIN
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
NUMBER 101 15
|
||||
NUMBER 101 18
|
||||
BEGIN
|
||||
PROMPT 2 4 "Imponibile "
|
||||
HELP "Importo imponibile"
|
||||
FLAGS "RV"
|
||||
FLAGS "V"
|
||||
PICTURE "."
|
||||
END
|
||||
|
||||
NUMBER 104 15
|
||||
NUMBER 104 18
|
||||
BEGIN
|
||||
PROMPT 48 4 "Imposta "
|
||||
PROMPT 48 4 "Imposta "
|
||||
HELP "Importo dell'IVA. Se e' nullo, col tasto F8 si puo' effettuare lo scorporo"
|
||||
FLAGS "RV"
|
||||
FLAGS "V"
|
||||
PICTURE "."
|
||||
END
|
||||
|
||||
|
@ -7,7 +7,7 @@ BEGIN
|
||||
WARNING "La data di scadenza e' obbligatoria"
|
||||
END
|
||||
|
||||
NUMBER 102 15
|
||||
NUMBER 102 18
|
||||
BEGIN
|
||||
PROMPT 1 3 "Importo "
|
||||
PICTURE "."
|
||||
@ -15,7 +15,7 @@ BEGIN
|
||||
WARNING "L'importo della rata non puo' essere nullo"
|
||||
END
|
||||
|
||||
NUMBER 103 15 3
|
||||
NUMBER 103 18 3
|
||||
BEGIN
|
||||
PROMPT 1 4 "Importo valuta "
|
||||
FLAGS "D"
|
||||
|
@ -2,43 +2,53 @@ PAGE "Scadenze" -1 -1 77 20
|
||||
|
||||
TEXT DLG_NULL
|
||||
BEGIN
|
||||
PROMPT 1 0 "@bGestione scadenzario"
|
||||
PROMPT 1 0 "Imponibili"
|
||||
END
|
||||
|
||||
TEXT DLG_NULL
|
||||
BEGIN
|
||||
PROMPT 30 0 "Imposte"
|
||||
END
|
||||
|
||||
TEXT DLG_NULL
|
||||
BEGIN
|
||||
PROMPT 59 0 "Spese"
|
||||
END
|
||||
|
||||
NUMBER FS_IMPONIBILI 15
|
||||
NUMBER FS_IMPONIBILI 18
|
||||
BEGIN
|
||||
PROMPT 1 1 "Imponibili "
|
||||
PROMPT 1 1 ""
|
||||
PICTURE "."
|
||||
FLAGS "D"
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
NUMBER FS_IMPOSTE 15
|
||||
NUMBER FS_IMPOSTE 18
|
||||
BEGIN
|
||||
PROMPT 30 1 "Imposte "
|
||||
PROMPT 30 1 ""
|
||||
PICTURE "."
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
NUMBER FS_SPESE 15
|
||||
NUMBER FS_SPESE 18
|
||||
BEGIN
|
||||
PROMPT 56 1 "Spese "
|
||||
PROMPT 59 1 ""
|
||||
PICTURE "."
|
||||
FLAGS "DR"
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
RADIOBUTTON FS_RDIFFER 1 35
|
||||
BEGIN
|
||||
PROMPT 1 2 "Opzioni ricalcolo rate"
|
||||
PROMPT 1 2 "Opzioni ricalcolo rate"
|
||||
ITEM "1|Differenziate" MESSAGE DISABLE,FS_NRATE
|
||||
ITEM "2|Uguali (obbligate dalla 2a)" MESSAGE ENABLE,FS_NRATE
|
||||
ITEM "3|Uguali dall'ultima modificata" MESSAGE DISABLE,FS_NRATE
|
||||
ITEM "4|Uguali finche' possibile" MESSAGE DISABLE,FS_NRATE
|
||||
END
|
||||
|
||||
STRING FS_NAMEPAG 50 23
|
||||
STRING FS_NAMEPAG 50 29
|
||||
BEGIN
|
||||
PROMPT 38 2 "Pagamento "
|
||||
PROMPT 38 2 "Pagamento "
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
@ -204,8 +214,8 @@ SPREADSHEET FS_RATESHEET 0 -2
|
||||
BEGIN
|
||||
PROMPT 1 11 "Rate"
|
||||
ITEM "Scadenza@10"
|
||||
ITEM "Importo@15"
|
||||
ITEM "In Valuta@15"
|
||||
ITEM "Importo@18"
|
||||
ITEM "In Valuta@18"
|
||||
ITEM "%@6"
|
||||
ITEM "Tipo"
|
||||
ITEM "Classif."
|
||||
|
344
cg/cg3100.cpp
344
cg/cg3100.cpp
@ -27,7 +27,6 @@
|
||||
enum liste {
|
||||
movimenti=1,
|
||||
fatture=2,
|
||||
movimenti_sezionale=3
|
||||
};
|
||||
|
||||
bool filter_func (const TRelation *);
|
||||
@ -90,6 +89,7 @@ class TListaMov_application : public TPrintapp
|
||||
long _numreg, _numreg_fin, _numreg_ini, _codalleg, _numeroregp,_codclifosucc;
|
||||
long _codcf_prec, _numr, _numero;
|
||||
int _ae, _anno, _annoes, _annoeser;
|
||||
bool _noseparator;
|
||||
real _totdocumenti, _totdoc, _totimponibile, _totimposta, _importo;
|
||||
real _op_esenti, _op_non_imp, _impo, _impos;
|
||||
real _tot_dare, _tot_avere, _tot_avere_giornaliero;
|
||||
@ -205,8 +205,7 @@ bool data_fine(TMask_field& f, KEY k)
|
||||
}
|
||||
|
||||
TEsercizi_contabili esc;
|
||||
if ( esc.exist(anno) && ( (app()._masc == "cg3100b") ||
|
||||
((app()._masc == "cg3100a" ) && (decidi == 2)) ) )
|
||||
if (esc.exist(anno) && ( (app()._masc == "cg3100b") || ((app()._masc == "cg3100a" ) && (decidi == 2)) ) )
|
||||
{
|
||||
const int prossimo = esc.next(anno);
|
||||
const TDate fine = esc[prossimo > 0 ? prossimo : anno].fine();
|
||||
@ -227,11 +226,9 @@ bool data_fine(TMask_field& f, KEY k)
|
||||
|
||||
bool TListaMov_application::RicercaDoc(const char * tipo)
|
||||
{
|
||||
TTable tab_tpd(TAB_TPD);
|
||||
TTable tab_tpd(TAB_TPD);
|
||||
TString codtab = format ("%-2s", tipo);
|
||||
|
||||
tab_tpd.zero();
|
||||
|
||||
tab_tpd.put("CODTAB", codtab);
|
||||
tab_tpd.read();
|
||||
if (tab_tpd.good())
|
||||
@ -751,26 +748,21 @@ void TListaMov_application::set_page(int file, int count)
|
||||
{
|
||||
_nr = 1;
|
||||
set_row(_nr,"@3n",FLD(LF_RMOV,RMV_NUMRIG));
|
||||
// set_row(_nr,"@5g@3s",FLD(LF_MOV,MOV_CODCAUS));
|
||||
// set_row(_nr,"@9g#.20t", &_descr_causale);
|
||||
set_row(_nr,"@30g@24s",FLD(LF_RMOV,RMV_DESCR));
|
||||
set_row(_nr,"@56g@pn",FLD(LF_RMOV,RMV_GRUPPO,"###"));
|
||||
set_row(_nr,"@60g@pn",FLD(LF_RMOV,RMV_CONTO,"###"));
|
||||
set_row(_nr,"@64g@pn",FLD(LF_RMOV,RMV_SOTTOCONTO,"######"));
|
||||
set_row(_nr,"@71g#.21t",&_descr);
|
||||
set_row(_nr,"@30g@22s",FLD(LF_RMOV,RMV_DESCR));
|
||||
set_row(_nr,"@54g@pn",FLD(LF_RMOV,RMV_GRUPPO,"###"));
|
||||
set_row(_nr,"@58g@pn",FLD(LF_RMOV,RMV_CONTO,"###"));
|
||||
set_row(_nr,"@62g@pn",FLD(LF_RMOV,RMV_SOTTOCONTO,"######"));
|
||||
set_row(_nr,"@69g#.20t",&_descr);
|
||||
_appoggio = current_cursor()->curr(LF_RMOV).get(RMV_SEZIONE);
|
||||
if ((_appoggio=="D")||(_appoggio=="d"))
|
||||
set_row(_nr,"@93g@pN",FLD(LF_RMOV,RMV_IMPORTO,"###.###.###.###"));
|
||||
set_row(_nr,"@90g@n",FLD(LF_RMOV,RMV_IMPORTO));
|
||||
else
|
||||
set_row(_nr,"@111g@pN",FLD(LF_RMOV,RMV_IMPORTO,"###.###.###.###"));
|
||||
//set_row(_nr,"@130g@f",FLD(LF_MOV,MOV_STAMPATO));
|
||||
set_row(_nr,"@110g@n",FLD(LF_RMOV,RMV_IMPORTO));
|
||||
}
|
||||
else if (file == LF_MOV)
|
||||
{
|
||||
TString dep(132);
|
||||
dep = "";
|
||||
_n = 1;
|
||||
set_row (_n++,(const char*)dep);
|
||||
set_row (_n++,"");
|
||||
set_row (_n, "Operazione n. @14g@7n", FLD(LF_MOV,MOV_NUMREG));
|
||||
set_row (_n, "@22gdel@26g@d",FLD(LF_MOV,MOV_DATAREG));
|
||||
set_row (_n, "@37g@36s",FLD(LF_MOV,MOV_DESCR));
|
||||
@ -806,12 +798,6 @@ void TListaMov_application::set_page(int file, int count)
|
||||
}
|
||||
break;
|
||||
|
||||
case fatture:
|
||||
break;
|
||||
|
||||
case movimenti_sezionale:
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -819,9 +805,7 @@ void TListaMov_application::set_page(int file, int count)
|
||||
|
||||
void TListaMov_application::stampa_intestazione()
|
||||
{
|
||||
TString sep;
|
||||
sep = "";
|
||||
set_row (1,(const char*)sep);
|
||||
set_row (1,"");
|
||||
if (_tipo_elenco == "C")
|
||||
set_row (2, "@bCliente@8g@6n", FLD(LF_MOV,MOV_CODCF));
|
||||
else
|
||||
@ -1077,11 +1061,7 @@ bool TListaMov_application::preprocess_page(int file,int counter)
|
||||
_tipodoc = cur->curr(LF_MOV).get(MOV_TIPODOC);
|
||||
_codval = cur->curr(LF_MOV).get(MOV_CODVALI);
|
||||
_totdoc = cur->curr(LF_MOV).get_real(MOV_TOTDOC);
|
||||
/*
|
||||
if ((_tipo_elenco != _tipo_clifo_prec) &&
|
||||
(_tipo_clifo_prec != "") && _salto_pagina)
|
||||
printer().formfeed();
|
||||
*/
|
||||
|
||||
if (_tipo_elenco != _tipo_clifo_prec && _tipo_clifo_prec != "")
|
||||
printer().formfeed();
|
||||
|
||||
@ -1151,18 +1131,7 @@ bool TListaMov_application::preprocess_page(int file,int counter)
|
||||
_allegb = CausAlleg(_codcaus);
|
||||
_descr_doc = DescrDoc(_tipodoc);
|
||||
_intra = cur->curr(LF_RMOVIVA).get_bool(RMI_INTRA);
|
||||
/*
|
||||
if ((_codval != "LIT") && _intracom)
|
||||
{
|
||||
reset_row(1);
|
||||
set_row(1,"Corr.in lire@14g@pN",FLD(LF_MOV,MOV_CORRLIRE,"###.###.###.###"));
|
||||
set_row(1,"@34gCorr.in valuta@49g@pN",FLD(LF_MOV,MOV_CORRVALUTA,"###.###.###,@@@"));
|
||||
if (_simbolo.not_empty())
|
||||
set_row(1,"@65g%.5s", (const char *)_simbolo);
|
||||
else
|
||||
set_row(1,"@65g%.3s", (const char *)_codval);
|
||||
}
|
||||
*/
|
||||
|
||||
if (!_settata_prima_riga)
|
||||
{
|
||||
reset_print();
|
||||
@ -1186,8 +1155,8 @@ bool TListaMov_application::preprocess_page(int file,int counter)
|
||||
set_row(2,"@49g@3s",FLD(LF_MOV,MOV_CODCAUS));
|
||||
set_row(2,"@53g@2s",FLD(LF_MOV,MOV_TIPODOC));
|
||||
set_row(2,"@56g%-.12s", (const char *)_descr_doc);
|
||||
set_row(2,"@69g@pN",FLD(LF_MOV,MOV_TOTDOC,"###.###.###.###"));
|
||||
set_row(2,"@85g@pN",FLD(LF_RMOVIVA,RMI_IMPONIBILE,"###.###.###.###"));
|
||||
set_row(2,"@67g@n",FLD(LF_MOV,MOV_TOTDOC));
|
||||
set_row(2,"@84g@n",FLD(LF_RMOVIVA,RMI_IMPONIBILE));
|
||||
set_row(2,"@101g@4s",FLD(LF_RMOVIVA,RMI_CODIVA));
|
||||
set_row(2,"@105g@1n",FLD(LF_RMOVIVA,RMI_TIPODET));
|
||||
if (_tipoatt == "E")
|
||||
@ -1196,7 +1165,7 @@ bool TListaMov_application::preprocess_page(int file,int counter)
|
||||
else if (_ricser == 2)
|
||||
set_row(2,"@109g2");
|
||||
set_row(2,"@111g@f",FLD(LF_RMOVIVA,RMI_INTRA));
|
||||
set_row(2,"@114g@pN",FLD(LF_RMOVIVA,RMI_IMPOSTA,"###.###.###.###"));
|
||||
set_row(2,"@114g@n",FLD(LF_RMOVIVA,RMI_IMPOSTA));
|
||||
if (_allegb)
|
||||
set_row(2,"@131g*");
|
||||
|
||||
@ -1207,10 +1176,10 @@ bool TListaMov_application::preprocess_page(int file,int counter)
|
||||
else if (_settata_prima_riga)
|
||||
{
|
||||
reset_print();
|
||||
set_row(1,"@85g@pN", FLD(LF_RMOVIVA,RMI_IMPONIBILE,"###.###.###.###"));
|
||||
set_row(1,"@84g@n", FLD(LF_RMOVIVA,RMI_IMPONIBILE));
|
||||
set_row(1,"@101g@4s", FLD(LF_RMOVIVA,RMI_CODIVA));
|
||||
set_row(1,"@105g@1n",FLD(LF_RMOVIVA,RMI_TIPODET));
|
||||
set_row(1,"@114g@pN", FLD(LF_RMOVIVA,RMI_IMPOSTA,"###.###.###.###"));
|
||||
set_row(1,"@114g@n", FLD(LF_RMOVIVA,RMI_IMPOSTA));
|
||||
incrementa_totali();
|
||||
}
|
||||
return TRUE;
|
||||
@ -1218,9 +1187,6 @@ bool TListaMov_application::preprocess_page(int file,int counter)
|
||||
}
|
||||
break;
|
||||
|
||||
case movimenti_sezionale:
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -1334,28 +1300,16 @@ print_action TListaMov_application::postprocess_page(int file,int count)
|
||||
{
|
||||
if (( _scelta_stampa == 0 && _controllo_mov_errati != 1 && _decidi == 2) || (_scelta_stampa == 1 && _decidi == 2))
|
||||
{
|
||||
TString data = _datareg.string();
|
||||
set_row(n, "@b@60gTotali del");
|
||||
set_row(n, "@b@71ggiorno %s", (const char *)data);
|
||||
TString pall (_tot_dare_giornaliero.string("#.###.###.###.###"));
|
||||
TString ball (_tot_avere_giornaliero.string("#.###.###.###.###"));
|
||||
set_row(n, "@b@91g%s", (const char*)pall);
|
||||
set_row(n++, "@b@109g%s", (const char*)ball);
|
||||
set_row(n, "@b@60gTotali del giorno %s", _datareg.string());
|
||||
set_row(n++, "@b@90g%r %r", &_tot_dare_giornaliero, &_tot_avere_giornaliero);
|
||||
_tot_avere_giornaliero = 0;
|
||||
_tot_dare_giornaliero = 0;
|
||||
}
|
||||
if ((_scelta_stampa == 0 && _controllo_mov_errati != 1 && FINITO) || (_scelta_stampa == 1 && FINITO))
|
||||
{
|
||||
TString sep;
|
||||
sep = "";
|
||||
set_row(n,(const char*)sep);
|
||||
set_row(++n, "@b@60gTotale generale");
|
||||
TString pal (_tot_dare_generale.string("#.###.###.###.###"));
|
||||
TString bal (_tot_avere_generale.string("#.###.###.###.###"));
|
||||
set_row(n, "@b@91g%s", (const char*)pal);
|
||||
set_row(n++, "@b@109g%s", (const char*)bal);
|
||||
//set_row(n, "@b@93g%r", &_tot_dare_generale);
|
||||
//set_row(n++, "@b@111g%r", &_tot_avere_generale);
|
||||
set_row(n++,"");
|
||||
set_row(n, "@b@60gTotale generale");
|
||||
set_row(n++, "@b@90g%r %r", &_tot_dare_generale, &_tot_avere_generale);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1386,12 +1340,6 @@ break;
|
||||
TString vall (corrval.string("###.###.###.###,@@@"));
|
||||
set_row(rr,"Corr.in lire@14g%r", &corrlire);
|
||||
set_row(rr,"@34gCorr.in valuta@49g%s", (const char*) vall);
|
||||
/*
|
||||
if (_simbolo.not_empty())
|
||||
set_row(1,"@65g%.5s", (const char *)_simbolo);
|
||||
else
|
||||
set_row(1,"@65g%.3s", (const char *)_codval);
|
||||
*/
|
||||
set_row(rr++,"@70g%-3s", (const char *)_codval);
|
||||
}
|
||||
_totdocumenti += _totdoc;
|
||||
@ -1423,11 +1371,11 @@ break;
|
||||
else
|
||||
set_row(rr++, "@bTotali Fornitore@18gDocumenti Totale documenti@49gAllegati:@63gImponibile@82gImposta@95gop. esenti@110gop. non imp.");
|
||||
set_row(rr, "@b@18g%9d", _documenti);
|
||||
set_row(rr, "@b@29g%r", &_totdocumenti);
|
||||
set_row(rr, "@b@58g%r", &_totimponibile);
|
||||
set_row(rr, "@b@74g%r", &_totimposta);
|
||||
set_row(rr, "@b@90g%r", &_op_esenti);
|
||||
set_row(rr, "@b@106g%r", &_op_non_imp);
|
||||
set_row(rr, "@b@28g%r", &_totdocumenti);
|
||||
set_row(rr, "@b@56g%r", &_totimponibile);
|
||||
set_row(rr, "@b@74g%r", &_totimposta);
|
||||
set_row(rr, "@b@92g%r", &_op_esenti);
|
||||
set_row(rr, "@b@110g%r", &_op_non_imp);
|
||||
_totimposta = 0;
|
||||
_totimponibile = 0;
|
||||
_op_esenti = 0;
|
||||
@ -1441,58 +1389,13 @@ break;
|
||||
}
|
||||
break;
|
||||
|
||||
case movimenti_sezionale:
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return NEXT_PAGE;
|
||||
return NEXT_PAGE;
|
||||
}
|
||||
|
||||
/************
|
||||
int TListaMov_application::my_next(TLocalisamfile & mov)
|
||||
{
|
||||
int esito;
|
||||
TString cod_reg, causale;
|
||||
int tipo_reg;
|
||||
int ann_reg;
|
||||
|
||||
esito = mov.next();
|
||||
|
||||
switch (_scelta_stampa)
|
||||
{
|
||||
case 0:
|
||||
return esito;
|
||||
case 1:
|
||||
while (!mov.eof())
|
||||
{
|
||||
cod_reg = mov.get (MOV_REG);
|
||||
ann_reg = mov.get_int (MOV_ANNOIVA);
|
||||
causale = mov.get (MOV_CODCAUS);
|
||||
|
||||
if ( ( _annoes != 0l)
|
||||
|| ( (causale < (const char*)_causale_ini) || (causale > (const char*)_causale_fin)) )
|
||||
{
|
||||
esito = mov.next();
|
||||
continue;
|
||||
}
|
||||
tipo_reg = CodiceRegistro (cod_reg, ann_reg);
|
||||
if ( (tipo_reg != 1) && (tipo_reg != 2) )
|
||||
return esito;
|
||||
|
||||
esito=mov.next();
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return esito;
|
||||
}
|
||||
********/
|
||||
|
||||
print_action TListaMov_application::postprocess_print(int file,int count)
|
||||
{
|
||||
if (count)
|
||||
@ -1509,9 +1412,6 @@ print_action TListaMov_application::postprocess_print(int file,int count)
|
||||
case fatture:
|
||||
break;
|
||||
|
||||
case movimenti_sezionale:
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -1595,13 +1495,7 @@ bool TListaMov_application::segnala_errori_primariga()
|
||||
if (tabtpd.read() == NOERR)
|
||||
{
|
||||
bool cor = tabtpd.get_bool("B0");
|
||||
/*
|
||||
i = (TipoIVA)tabtpd.get_int("I0"); // IVA acquisti, vendite, generica
|
||||
const TipoIVA ri = rg.iva();
|
||||
if (i == iva_generica) i = ri;
|
||||
if (i != ri || ( cor && !rg.corrispettivi() ))
|
||||
_err.set(16);
|
||||
*/
|
||||
|
||||
int i = tabtpd.get_int("I0");
|
||||
if (i == 1 && tipo != 1)
|
||||
_err.set(15);
|
||||
@ -2005,17 +1899,14 @@ bool TListaMov_application::set_print(int m)
|
||||
_masc = "";
|
||||
switch(toupper(_tipoc))
|
||||
{
|
||||
case 'M':
|
||||
_masc = "cg3100a";
|
||||
_tipo_lista = movimenti;
|
||||
break;
|
||||
case 'C':
|
||||
_masc = "cg3100b";
|
||||
_tipo_lista = fatture;
|
||||
break;
|
||||
case 'S':
|
||||
_masc = "cg3100c";
|
||||
_tipo_lista = movimenti_sezionale;
|
||||
case 'M':
|
||||
_masc = "cg3100a";
|
||||
_tipo_lista = movimenti;
|
||||
break;
|
||||
break;
|
||||
default:
|
||||
NFCHECK("Bad _tipoc");
|
||||
@ -2028,7 +1919,8 @@ bool TListaMov_application::set_print(int m)
|
||||
msk.set_handler(F_DATAINI, data_inizio);
|
||||
msk.set_handler(F_DATAFIN, data_fine);
|
||||
|
||||
if (msk.run() != K_ENTER) return FALSE;
|
||||
if (msk.run() != K_ENTER)
|
||||
return FALSE;
|
||||
|
||||
reset_files();
|
||||
TLocalisamfile* fl;
|
||||
@ -2110,8 +2002,9 @@ bool TListaMov_application::set_print(int m)
|
||||
}
|
||||
break;
|
||||
|
||||
case fatture:
|
||||
{
|
||||
case fatture:
|
||||
{
|
||||
_noseparator = msk.get_bool(F_SEPARATOR);
|
||||
fl = &(current_cursor()->file(LF_MOV));
|
||||
TString tipo = msk.get(F_TIPOELENCO);
|
||||
//bool movprov = msk.get_bool(F_STAMPAMOVP);
|
||||
@ -2163,9 +2056,6 @@ bool TListaMov_application::set_print(int m)
|
||||
}
|
||||
break;
|
||||
|
||||
case movimenti_sezionale:
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -2238,10 +2128,7 @@ bool TListaMov_application::user_destroy() // releasev e arrmask
|
||||
|
||||
void TListaMov_application::init_print(const TMask& msk)
|
||||
{
|
||||
set_real_picture("###.###.###.###");
|
||||
|
||||
TDate data (msk.get(F_DATASTAMPA));
|
||||
|
||||
const TDate data (msk.get(F_DATASTAMPA));
|
||||
printer().setdate(data);
|
||||
printer().footerlen(5);
|
||||
|
||||
@ -2249,6 +2136,7 @@ void TListaMov_application::init_print(const TMask& msk)
|
||||
{
|
||||
case movimenti:
|
||||
{
|
||||
set_real_picture("###.###.###.###.###");
|
||||
reset_print();
|
||||
_flags = 0;
|
||||
_err.reset();
|
||||
@ -2315,67 +2203,64 @@ void TListaMov_application::init_print(const TMask& msk)
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case fatture:
|
||||
{
|
||||
_flags = 0;
|
||||
{
|
||||
reset_print();
|
||||
_settata_prima_riga = FALSE;
|
||||
_tipo_clifo_prec = "";
|
||||
_codcf_prec = 0l;
|
||||
_numeroregp = 0;
|
||||
_documenti = 0;
|
||||
_totdocumenti = 0;
|
||||
_totimponibile = 0;
|
||||
_totimposta = 0;
|
||||
_op_esenti = 0;
|
||||
_op_non_imp = 0;
|
||||
_annoes = msk.get_int(F_ANNO);
|
||||
_salto_pagina = (bool)(msk.get(F_CAMBIO)=="X");
|
||||
_data_ini = msk.get(F_DATAINI);
|
||||
if (_data_ini.ok())
|
||||
_flags |= ST_DATA;
|
||||
_data_fin = msk.get(F_DATAFIN);
|
||||
if (_data_fin.ok())
|
||||
_flags |= ST_DATA;
|
||||
TString tipo = msk.get(F_TIPOELENCO);
|
||||
if ((tipo=="C")||(tipo=="F"))
|
||||
case fatture:
|
||||
{
|
||||
_codice_ini = atol(msk.get(F_CODICEINI));
|
||||
_codice_fin = atol(msk.get(F_CODICEFIN));
|
||||
}
|
||||
else
|
||||
{
|
||||
_codice_ini = atol(msk.get(F_CODICEINI1));
|
||||
_codice_fin = atol(msk.get(F_CODICEFIN1));
|
||||
}
|
||||
if (_codice_ini != 0)
|
||||
_flags |= ST_CODICE;
|
||||
if (_codice_fin != 0)
|
||||
_flags |= ST_CODICE;
|
||||
if (tipo == "E")
|
||||
{
|
||||
_tipo_ini = "C";
|
||||
_tipo_fin = "F";
|
||||
}
|
||||
else
|
||||
{
|
||||
_tipo_ini = tipo;
|
||||
_tipo_fin = tipo;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
if (_noseparator)
|
||||
set_real_picture("################");
|
||||
else
|
||||
set_real_picture("####.###.###.###");
|
||||
|
||||
_flags = 0;
|
||||
|
||||
|
||||
case movimenti_sezionale:
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
reset_print();
|
||||
_settata_prima_riga = FALSE;
|
||||
_tipo_clifo_prec = "";
|
||||
_codcf_prec = 0l;
|
||||
_numeroregp = 0;
|
||||
_documenti = 0;
|
||||
_totdocumenti = 0;
|
||||
_totimponibile = 0;
|
||||
_totimposta = 0;
|
||||
_op_esenti = 0;
|
||||
_op_non_imp = 0;
|
||||
_annoes = msk.get_int(F_ANNO);
|
||||
_salto_pagina = (bool)(msk.get(F_CAMBIO)=="X");
|
||||
_data_ini = msk.get(F_DATAINI);
|
||||
if (_data_ini.ok())
|
||||
_flags |= ST_DATA;
|
||||
_data_fin = msk.get(F_DATAFIN);
|
||||
if (_data_fin.ok())
|
||||
_flags |= ST_DATA;
|
||||
TString tipo = msk.get(F_TIPOELENCO);
|
||||
if ((tipo=="C")||(tipo=="F"))
|
||||
{
|
||||
_codice_ini = atol(msk.get(F_CODICEINI));
|
||||
_codice_fin = atol(msk.get(F_CODICEFIN));
|
||||
}
|
||||
else
|
||||
{
|
||||
_codice_ini = atol(msk.get(F_CODICEINI1));
|
||||
_codice_fin = atol(msk.get(F_CODICEFIN1));
|
||||
}
|
||||
if (_codice_ini != 0)
|
||||
_flags |= ST_CODICE;
|
||||
if (_codice_fin != 0)
|
||||
_flags |= ST_CODICE;
|
||||
if (tipo == "E")
|
||||
{
|
||||
_tipo_ini = "C";
|
||||
_tipo_fin = "F";
|
||||
}
|
||||
else
|
||||
{
|
||||
_tipo_ini = tipo;
|
||||
_tipo_fin = tipo;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void TListaMov_application::preprocess_header()
|
||||
@ -2450,8 +2335,8 @@ void TListaMov_application::preprocess_header()
|
||||
set_header (soh++, " tutte le causali");
|
||||
if (_flags & ST_REGISTRO)
|
||||
{
|
||||
set_header (soh, "dal registro@13g%s",(const char*)_registro_ini);
|
||||
set_header (soh, "@17gal registro@29g%s",(const char*)_registro_fin);
|
||||
set_header (soh, "dal registro %s",(const char*)_registro_ini);
|
||||
set_header (soh, "@17gal registro %s",(const char*)_registro_fin);
|
||||
}
|
||||
else
|
||||
set_header (soh, "tutti i registri");
|
||||
@ -2540,30 +2425,22 @@ void TListaMov_application::preprocess_header()
|
||||
else
|
||||
if (_flags & ST_DATA)
|
||||
{
|
||||
set_header (soh, "@15gdalla data@26g%s", (const char*)_data_ini.string());
|
||||
set_header (soh, "@37galla data@47g%s", (const char*)_data_fin.string());
|
||||
set_header (soh, "@15gdalla data %s", (const char*)_data_ini.string());
|
||||
set_header (soh, "@37galla data %s", (const char*)_data_fin.string());
|
||||
}
|
||||
else
|
||||
set_header (soh, "@15gcompleta in ordine di data");
|
||||
if (_flags & ST_CODICE)
|
||||
{
|
||||
set_header (soh, "@74gdal codice@85g%ld", _codice_ini);
|
||||
set_header (soh, "@92gal codice@102g%ld", _codice_fin);
|
||||
set_header (soh, "@74gdal codice %ld", _codice_ini);
|
||||
set_header (soh, "@92gal codice %ld", _codice_fin);
|
||||
}
|
||||
sep.fill('-');
|
||||
set_header (++soh, (const char *) sep);
|
||||
set_header (++soh, "Numero Data @17gCod Protoc. Documento@49gCod Tp @75gTotale@101gCd Tp T O@129gNo");
|
||||
set_header (++soh, "Regis. Operaz.@17gReg Numero Data@42gNumero@49gCau Dc @56gDescrizione@75gDocumento@90gImponibile@101gIv Det A I@121gImposta@129gAll");
|
||||
set_header (++soh, "Numero Data Cod Protoc. Documento@49gCod Tp @75gTotale@101gCd Tp T O@129gNo");
|
||||
set_header (++soh, "Regis. Operaz. Reg Numero Data@42gNumero@49gCau Dc @56gDescrizione@75gDocumento@90gImponibile@101gIv Det A I@121gImposta@129gAll");
|
||||
break;
|
||||
|
||||
case movimenti_sezionale:
|
||||
sep.fill(' ');
|
||||
sep.overwrite ("Lista movimenti di solo sezionale");
|
||||
set_header (soh++, (const char*)sep);
|
||||
sep.fill('-');
|
||||
set_header (soh++, (const char *) sep);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -2573,19 +2450,16 @@ void TListaMov_application::preprocess_header()
|
||||
int cg3100(int argc, char* argv[])
|
||||
{
|
||||
const char tipo = *argv[2];
|
||||
const char* title = "Lista movimenti";
|
||||
TListaMov_application a(tipo);
|
||||
|
||||
const char* title;
|
||||
switch (tipo)
|
||||
{
|
||||
case 'C':
|
||||
title = "Lista fatture clienti/fornitori";
|
||||
break;
|
||||
/*
|
||||
case 'S':
|
||||
title = "Lista movimenti di solo sezionale";
|
||||
break;
|
||||
*/
|
||||
default:
|
||||
title = "Lista movimenti";
|
||||
break;
|
||||
}
|
||||
a.run(argc, argv, title);
|
||||
|
@ -32,6 +32,7 @@
|
||||
#define F_RAGSOCFIN 128
|
||||
#define F_RAGSOCINI1 129
|
||||
#define F_RAGSOCFIN1 130
|
||||
#define F_SEPARATOR 131
|
||||
|
||||
#define ST_DATA 0x0001
|
||||
#define ST_NUMERO 0x0002
|
||||
|
@ -4,15 +4,15 @@ PAGE "Lista Fatture" -1 -1 73 16
|
||||
|
||||
NUMBER F_CODDITTA 5
|
||||
BEGIN
|
||||
PROMPT 2 1 "Ditta "
|
||||
FLAGS "FRD"
|
||||
USE LF_NDITTE KEY 1
|
||||
CHECKTYPE REQUIRED
|
||||
INPUT CODDITTA F_CODDITTA
|
||||
DISPLAY "Codice" CODDITTA
|
||||
DISPLAY "Ragione sociale @50" RAGSOC
|
||||
OUTPUT F_CODDITTA CODDITTA
|
||||
OUTPUT F_RAGSOC RAGSOC
|
||||
PROMPT 2 1 "Ditta "
|
||||
FLAGS "FRD"
|
||||
USE LF_NDITTE KEY 1
|
||||
CHECKTYPE REQUIRED
|
||||
INPUT CODDITTA F_CODDITTA
|
||||
DISPLAY "Codice" CODDITTA
|
||||
DISPLAY "Ragione sociale @50" RAGSOC
|
||||
OUTPUT F_CODDITTA CODDITTA
|
||||
OUTPUT F_RAGSOC RAGSOC
|
||||
END
|
||||
|
||||
STRING F_RAGSOC 50
|
||||
@ -24,7 +24,7 @@ END
|
||||
DATE F_DATASTAMPA
|
||||
BEGIN
|
||||
PROMPT 48 1 "Data stampa "
|
||||
HELP "Data in cui viene effettuata la stampa"
|
||||
HELP "Data in cui viene effettuata la stampa"
|
||||
FLAGS "A"
|
||||
END
|
||||
|
||||
@ -213,6 +213,11 @@ BEGIN
|
||||
END
|
||||
*/
|
||||
|
||||
BOOLEAN F_SEPARATOR
|
||||
BEGIN
|
||||
PROMPT 2 13 "Non stampare i separatri delle migliaia"
|
||||
END
|
||||
|
||||
BUTTON DLG_PRINT 9 2
|
||||
BEGIN
|
||||
PROMPT -12 -1 "~Stampa"
|
||||
|
112
cg/cg3100c.uml
112
cg/cg3100c.uml
@ -1,112 +0,0 @@
|
||||
|
||||
#include "cg3100.h"
|
||||
|
||||
PAGE "" -1 -1 76 19
|
||||
|
||||
|
||||
NUMBER F_CODDITTA 5
|
||||
BEGIN
|
||||
PROMPT 2 2 "Ditta "
|
||||
FLAGS "FRD"
|
||||
USE LF_NDITTE KEY 1
|
||||
CHECKTYPE REQUIRED
|
||||
INPUT CODDITTA F_CODDITTA
|
||||
DISPLAY "Codice" CODDITTA
|
||||
DISPLAY "Ragione sociale @50" RAGSOC
|
||||
OUTPUT F_CODDITTA CODDITTA
|
||||
OUTPUT F_RAGSOC RAGSOC
|
||||
END
|
||||
|
||||
STRING F_RAGSOC 50
|
||||
BEGIN
|
||||
PROMPT 2 3 "Ragione sociale "
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
NUMBER F_ANNO 4
|
||||
BEGIN
|
||||
PROMPT 2 5 "Anno esercizio "
|
||||
HELP "Anno d'esercizio di cui si vuole la stampa"
|
||||
USE ESC
|
||||
CHECKTYPE NORMAL
|
||||
INPUT CODTAB F_ANNO
|
||||
DISPLAY "Anno" CODTAB
|
||||
DISPLAY "Data inizio esercizio" D0
|
||||
DISPLAY "Data fine esercizio" D1
|
||||
OUTPUT F_ANNO CODTAB
|
||||
FLAGS "RZ"
|
||||
ADD RUN cg0 -5 esc
|
||||
END
|
||||
|
||||
DATE F_DATASTAMPA
|
||||
BEGIN
|
||||
PROMPT 2 6 "Data stampa "
|
||||
HELP "Data in cui viene effettuata la stampa"
|
||||
FLAGS "A"
|
||||
END
|
||||
|
||||
RADIOBUTTON F_DECIDI 10
|
||||
BEGIN
|
||||
PROMPT 2 8 "Stampa "
|
||||
HELP "Criteri di selezione dei movimenti"
|
||||
ITEM "2|data"
|
||||
MESSAGE DISABLE,2@|RESET,2@|ENABLE,1@
|
||||
ITEM "1|numero"
|
||||
MESSAGE DISABLE,1@|RESET,1@|ENABLE,2@
|
||||
END
|
||||
|
||||
DATE F_DATAINI
|
||||
BEGIN
|
||||
PROMPT 19 9 "Stampa mov. dalla data "
|
||||
HELP "Data da cui iniziare la stampa dei movimenti"
|
||||
GROUP 1
|
||||
END
|
||||
|
||||
DATE F_DATAFIN
|
||||
BEGIN
|
||||
PROMPT 55 9 "alla data "
|
||||
HELP "Data a cui terminare la stampa dei movimenti"
|
||||
GROUP 1
|
||||
END
|
||||
|
||||
NUMBER F_NUMEROINI 7
|
||||
BEGIN
|
||||
PROMPT 19 10 "Stampa mov. dal numero "
|
||||
HELP "Numero da cui iniziare la stampa dei movimenti"
|
||||
FLAGS "R"
|
||||
GROUP 2
|
||||
END
|
||||
|
||||
NUMBER F_NUMEROFIN 7
|
||||
BEGIN
|
||||
PROMPT 55 10 "al numero "
|
||||
HELP "Numero a cui terminare la stampa dei movimenti"
|
||||
FLAGS "R"
|
||||
GROUP 2
|
||||
END
|
||||
|
||||
BOOLEAN F_STAMPAMOVP
|
||||
BEGIN
|
||||
PROMPT 2 12 "Stampa movimenti provvisori "
|
||||
HELP "Indicare se stampare i movimenti provvisori"
|
||||
END
|
||||
|
||||
TEXT DLG_NULL
|
||||
BEGIN
|
||||
PROMPT 2 15 "(N.B. se non indicato nessun valore stampa completa in ordine di data) "
|
||||
END
|
||||
|
||||
BUTTON DLG_PRINT 9 2
|
||||
BEGIN
|
||||
PROMPT -12 -1 "~Stampa"
|
||||
MESSAGE EXIT,K_ENTER
|
||||
END
|
||||
|
||||
BUTTON DLG_QUIT 9 2
|
||||
BEGIN
|
||||
PROMPT -22 -1 ""
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
481
cg/cg3200.cpp
481
cg/cg3200.cpp
@ -83,6 +83,9 @@ class TMastrini_application : public TPrintapp
|
||||
|
||||
int _rw, _conta_mastrini, _indice_array, _item, _item_lista, _indice_lista;
|
||||
int _ddociva_len;
|
||||
|
||||
bool _noseparator;
|
||||
TString _real_picture;
|
||||
|
||||
protected:
|
||||
virtual bool user_create() ;
|
||||
@ -881,9 +884,7 @@ void TMastrini_application::fai_stampa132()
|
||||
set_row (_rw,"@30g#7t", &_numdoc);
|
||||
set_row (_rw,"@38g#3t", &_codcaus);
|
||||
|
||||
set_row (_rw,"@117g#3t", &_g_contr);
|
||||
set_row (_rw,"@120g#3t", &_c_contr);
|
||||
set_row (_rw,"@123g#6t", &_s_contr);
|
||||
set_row (_rw,"@117g#3t #3t #6t", &_g_contr, &_c_contr, &_s_contr);
|
||||
}
|
||||
|
||||
void TMastrini_application::fai_stampa198()
|
||||
@ -968,11 +969,8 @@ void TMastrini_application::fai_stampa198()
|
||||
|
||||
// Stampa saldo movimenti
|
||||
|
||||
set_row (_rw,"@149g#t", &_saldo_movimenti_str);
|
||||
|
||||
set_row (_rw,"@165g#3t", &_g_contr);
|
||||
set_row (_rw,"@169g#3t", &_c_contr);
|
||||
set_row (_rw,"@173g#6t", &_s_contr);
|
||||
set_row (_rw,"@151g#t", &_saldo_movimenti_str);
|
||||
set_row (_rw,"@168g#3t #3t #6t", &_g_contr, &_c_contr, &_s_contr);
|
||||
}
|
||||
|
||||
void TMastrini_application::stampa_totali132()
|
||||
@ -983,34 +981,28 @@ void TMastrini_application::stampa_totali132()
|
||||
_rw = 2;
|
||||
|
||||
sep.fill('-'); //Stampa 132 - (sep(132))
|
||||
set_row(_rw++,"@0g%s", (const char *) sep);
|
||||
set_row(_rw++,"@0g%s", (const char*)sep);
|
||||
|
||||
_totprogre_dare=_progredare+_totale_periodo_dare;
|
||||
_totprogre_avere=_progreavere+_totale_periodo_avere;
|
||||
_saldo_periodo = _totale_periodo_dare - _totale_periodo_avere;
|
||||
_saldo_progre = _totprogre_dare - _totprogre_avere;
|
||||
_saldo_progre_al = _totprogre_dare_al - _totprogre_avere_al;
|
||||
TString string = _saldo_periodo.string("###.###.###.###");
|
||||
set_row (_rw,"@32gTOTALI PERIODO@69g%15s", (const char*)string);
|
||||
string = _totale_periodo_dare.string("###.###.###.###");
|
||||
set_row (_rw,"@85g%15s", (const char*)string);
|
||||
string = _totale_periodo_avere.string("###.###.###.###");
|
||||
set_row (_rw++,"@101g%15s", (const char*)string);
|
||||
string = _saldo_progre.string("###.###.###.###");
|
||||
set_row (_rw,"@32gTOTALI PROGRESSIVI@69g%15s", (const char*)string);
|
||||
string = _totprogre_dare.string("###.###.###.###");
|
||||
set_row (_rw,"@85g%15s", (const char*)string);
|
||||
string = _totprogre_avere.string("###.###.###.###");
|
||||
set_row (_rw++,"@101g%15s", (const char*)string);
|
||||
set_row (_rw,"@32gTOTALI PERIODO");
|
||||
set_row (_rw,"@66g%r", &_saldo_periodo);
|
||||
set_row (_rw,"@83g%r", &_totale_periodo_dare);
|
||||
set_row (_rw++,"@100g%r", &_totale_periodo_avere);
|
||||
|
||||
set_row (_rw,"@32gTOTALI PROGRESSIVI");
|
||||
set_row (_rw,"@66g%r", &_saldo_progre);
|
||||
set_row (_rw,"@83g%r", &_totprogre_dare);
|
||||
set_row (_rw++,"@100g%r", &_totprogre_avere);
|
||||
if (_stampaprogre) //Progressivi attuali
|
||||
{
|
||||
TString str = _saldo_progre_al.string("###.###.###.###");
|
||||
set_row (_rw,"@32gTOTALI PROGRESSIVI AL@55g%s",(const char*)_ultima_data_reg.string());
|
||||
set_row (_rw,"@69g%15s", (const char*)str);
|
||||
str = _totprogre_dare_al.string("###.###.###.###");
|
||||
set_row (_rw,"@85g%15s", (const char*)str);
|
||||
str = _totprogre_avere_al.string("###.###.###.###");
|
||||
set_row (_rw,"@101g%15s", (const char*)str);
|
||||
set_row (_rw,"@32gTOTALI PROGRESSIVI AL %s", _ultima_data_reg.string());
|
||||
set_row (_rw,"@66g%r", &_saldo_progre_al);
|
||||
set_row (_rw,"@83g%r", &_totprogre_dare_al);
|
||||
set_row (_rw,"@100g%r", &_totprogre_avere_al);
|
||||
}
|
||||
_devi_stampare_footer = FALSE;
|
||||
}
|
||||
@ -1041,27 +1033,27 @@ void TMastrini_application::carica_array_totali132()
|
||||
_lista.add(r);
|
||||
r = "";
|
||||
|
||||
r.add("@32gTOTALI PERIODO@69g%15s@85g%15s@101g%15s");
|
||||
r.add(_saldo_periodo.string("###.###.###.###"));
|
||||
r.add(_totale_periodo_dare.string("###.###.###.###"));
|
||||
r.add(_totale_periodo_avere.string("###.###.###.###"));
|
||||
r.add("@32gTOTALI PERIODO@66g%s@83g%s@100g%s");
|
||||
r.add(_saldo_periodo.string(_real_picture));
|
||||
r.add(_totale_periodo_dare.string(_real_picture));
|
||||
r.add(_totale_periodo_avere.string(_real_picture));
|
||||
_lista.add(r);
|
||||
r = "";
|
||||
|
||||
r.add("@32gTOTALI PROGRESSIVI@69g%15s@85g%15s@101g%15s");
|
||||
r.add(_saldo_progre.string("###.###.###.###"));
|
||||
r.add(_totprogre_dare.string("###.###.###.###"));
|
||||
r.add(_totprogre_avere.string("###.###.###.###"));
|
||||
r.add("@32gTOTALI PROGRESSIVI@66g%s@83g%s@100g%s");
|
||||
r.add(_saldo_progre.string(_real_picture));
|
||||
r.add(_totprogre_dare.string(_real_picture));
|
||||
r.add(_totprogre_avere.string(_real_picture));
|
||||
_lista.add(r);
|
||||
r = "";
|
||||
|
||||
if (_stampaprogre) //Progressivi attuali
|
||||
{
|
||||
r.add("@32gTOTALI PROGRESSIVI AL@55g%s@69g%15s@85g%15s@101g%15s");
|
||||
r.add("@32gTOTALI PROGRESSIVI AL@55g%s@66g%s@83g%s@100g%s");
|
||||
r.add(_ultima_data_reg.string());
|
||||
r.add(_saldo_progre_al.string("###.###.###.###"));
|
||||
r.add(_totprogre_dare_al.string("###.###.###.###"));
|
||||
r.add(_totprogre_avere_al.string("###.###.###.###"));
|
||||
r.add(_saldo_progre_al.string(_real_picture));
|
||||
r.add(_totprogre_dare_al.string(_real_picture));
|
||||
r.add(_totprogre_avere_al.string(_real_picture));
|
||||
_lista.add(r);
|
||||
r = "";
|
||||
}
|
||||
@ -1086,7 +1078,7 @@ void TMastrini_application::carica_array_totali132()
|
||||
r.add(fmt);
|
||||
r.add(riga._descrdoc);
|
||||
totale = riga._totdociva;
|
||||
r.add(totale.string("###.###.###.###"));
|
||||
r.add(totale.string(_real_picture));
|
||||
_lista.add(r);
|
||||
r = "";
|
||||
}
|
||||
@ -1167,37 +1159,28 @@ void TMastrini_application::stampa_totali132_II()
|
||||
|
||||
void TMastrini_application::stampa_totali198()
|
||||
{
|
||||
TString sep(198);
|
||||
|
||||
if (_nummast == 1 || _nummast == 3)
|
||||
_rw = 1;
|
||||
|
||||
TString sep(198);
|
||||
sep.fill('-'); //Stampa 198 - (sep(198))
|
||||
set_row(_rw++,"@0g%s", (const char *) sep);
|
||||
set_row(_rw++,"@0g%s", (const char*)sep);
|
||||
|
||||
_totprogre_dare=_progredare+_totale_periodo_dare;
|
||||
_totprogre_avere=_progreavere+_totale_periodo_avere;
|
||||
TString string = _totale_periodo_dare.string("###.###.###.###");
|
||||
set_row (_rw,"@32gTOTALI PERIODO@101g%15s", (const char*)string);
|
||||
string = _totale_periodo_avere.string("###.###.###.###");
|
||||
set_row (_rw,"@117g%15s", (const char*)string);
|
||||
string = _saldo_movimenti.string("###.###.###.###");
|
||||
set_row (_rw++,"@149g%15s", (const char*)string);
|
||||
string = _totprogre_dare.string("###.###.###.###");
|
||||
set_row (_rw,"@32gTOTALI PROGRESSIVI@101g%15s",(const char*)string);
|
||||
string = _totprogre_avere.string("###.###.###.###");
|
||||
set_row (_rw,"@117g%15s", (const char*)string);
|
||||
string = _saldo_progressivi.string("###.###.###.###");
|
||||
set_row (_rw++,"@133g%15s", (const char*)string);
|
||||
|
||||
set_row (_rw,"@32gTOTALI PERIODO@100g%r", &_totale_periodo_dare);
|
||||
set_row (_rw,"@117g%r", &_totale_periodo_avere);
|
||||
set_row (_rw++,"@151g%r", &_saldo_movimenti);
|
||||
set_row (_rw,"@32gTOTALI PROGRESSIVI@100g%r", &_totprogre_dare);
|
||||
set_row (_rw,"@117g%r", &_totprogre_avere);
|
||||
set_row (_rw++,"@134g%r", &_saldo_progressivi);
|
||||
if (_stampaprogre) //Progressivi attuali
|
||||
{
|
||||
set_row(_rw,"@32gTOTALI PROGRESSIVI AL@55g%s",(const char*)_ultima_data_reg.string());
|
||||
TString str = _totprogre_dare_al.string("###.###.###.###");
|
||||
set_row (_rw,"@101g%15s", (const char*)str);
|
||||
str = _totprogre_avere_al.string("###.###.###.###");
|
||||
set_row (_rw,"@117g%15s", (const char*)str);
|
||||
str = _saldo_progressivi.string("###.###.###.###");
|
||||
set_row (_rw,"@133g%15s", (const char*)str);
|
||||
set_row(_rw,"@32gTOTALI PROGRESSIVI AL@55g%s", _ultima_data_reg.string());
|
||||
set_row (_rw,"@100g%r", &_totprogre_dare_al);
|
||||
set_row (_rw,"@117g%r", &_totprogre_avere_al);
|
||||
set_row (_rw,"@134g%r", &_saldo_progressivi);
|
||||
}
|
||||
_devi_stampare_footer = FALSE;
|
||||
}
|
||||
@ -1225,27 +1208,27 @@ void TMastrini_application::carica_array_totali198()
|
||||
_totprogre_dare=_progredare+_totale_periodo_dare;
|
||||
_totprogre_avere=_progreavere+_totale_periodo_avere;
|
||||
|
||||
r.add("@32gTOTALI PERIODO@101g%15s@117g%15s@149g%15s");
|
||||
r.add(_totale_periodo_dare.string("###.###.###.###"));
|
||||
r.add(_totale_periodo_avere.string("###.###.###.###"));
|
||||
r.add(_saldo_movimenti.string("###.###.###.###"));
|
||||
r.add("@32gTOTALI PERIODO@100g%s@117g%s@151g%s");
|
||||
r.add(_totale_periodo_dare.string(_real_picture));
|
||||
r.add(_totale_periodo_avere.string(_real_picture));
|
||||
r.add(_saldo_movimenti.string(_real_picture));
|
||||
_lista.add(r);
|
||||
r = "";
|
||||
|
||||
r.add("@32gTOTALI PROGRESSIVI@101g%15s@117g%15s@133g%15s");
|
||||
r.add(_totprogre_dare.string("###.###.###.###"));
|
||||
r.add(_totprogre_avere.string("###.###.###.###"));
|
||||
r.add(_saldo_progressivi.string("###.###.###.###"));
|
||||
r.add("@32gTOTALI PROGRESSIVI@100g%s@117g%s@134g%s");
|
||||
r.add(_totprogre_dare.string(_real_picture));
|
||||
r.add(_totprogre_avere.string(_real_picture));
|
||||
r.add(_saldo_progressivi.string(_real_picture));
|
||||
_lista.add(r);
|
||||
r = "";
|
||||
|
||||
if (_stampaprogre) //Progressivi attuali
|
||||
{
|
||||
r.add("@32gTOTALI PROGRESSIVI AL@55g%s@101g%15s@117g%15s@133g%15s");
|
||||
r.add("@32gTOTALI PROGRESSIVI AL@55g%s@100g%s@117g%s@134g%s");
|
||||
r.add(_ultima_data_reg.string());
|
||||
r.add(_totprogre_dare_al.string("###.###.###.###"));
|
||||
r.add(_totprogre_avere_al.string("###.###.###.###"));
|
||||
r.add(_saldo_progressivi.string("###.###.###.###"));
|
||||
r.add(_totprogre_dare_al.string(_real_picture));
|
||||
r.add(_totprogre_avere_al.string(_real_picture));
|
||||
r.add(_saldo_progressivi.string(_real_picture));
|
||||
_lista.add(r);
|
||||
r = "";
|
||||
}
|
||||
@ -1259,10 +1242,14 @@ void TMastrini_application::carica_array_totali198()
|
||||
r.add(sep);
|
||||
_lista.add(r);
|
||||
r = "";
|
||||
|
||||
// Guy: Real dick programmig!
|
||||
// TString fmt ("@0g%s");
|
||||
// TString fmt1(format("@%dg", _ddociva_len));
|
||||
// fmt << fmt1 << "%15s";
|
||||
|
||||
TString fmt ("@0g%s");
|
||||
TString fmt1(format("@%dg", _ddociva_len));
|
||||
fmt << fmt1 << "%15s";
|
||||
TString16 fmt;
|
||||
fmt << "@0g%s@" << _ddociva_len << "g%15s";
|
||||
|
||||
for (int j = 0; j < _b.items(); j++)
|
||||
{
|
||||
@ -1270,7 +1257,7 @@ void TMastrini_application::carica_array_totali198()
|
||||
r.add(fmt);
|
||||
r.add(riga._descrdoc);
|
||||
totale = riga._totdociva;
|
||||
r.add(totale.string("###.###.###.###"));
|
||||
r.add(totale.string(_real_picture));
|
||||
_lista.add(r);
|
||||
r = "";
|
||||
}
|
||||
@ -1518,7 +1505,7 @@ bool TMastrini_application::preprocess_page(int file, int counter)
|
||||
// nella maschera. Se non viene specificato li stampa tutti
|
||||
|
||||
_importo = current_cursor()->curr(LF_RMOV).get_real(RMV_IMPORTO);
|
||||
_importo_str = _importo.string("###.###.###.###");
|
||||
_importo_str = _importo.string(_real_picture);
|
||||
_mov->setkey(1);
|
||||
_mov->curr().zero();
|
||||
_mov->curr().put(MOV_NUMREG,_numreg);
|
||||
@ -1561,15 +1548,13 @@ bool TMastrini_application::preprocess_page(int file, int counter)
|
||||
if (_numcarat == 1)
|
||||
set_row (_rw, "@131g*");
|
||||
else
|
||||
if (_numcarat == 2)
|
||||
set_row (_rw, "@197g*");
|
||||
set_row (_rw, "@197g*");
|
||||
|
||||
if (_stampa_mov_prov && provvis.trim().not_empty())
|
||||
if (_numcarat == 1)
|
||||
set_row(_rw, "@129gP");
|
||||
else
|
||||
if (_numcarat == 2)
|
||||
set_row(_rw, "@195gP");
|
||||
set_row(_rw, "@195gP");
|
||||
|
||||
_codcaus = _mov->curr().get(MOV_CODCAUS);
|
||||
_tipodoc = _mov->curr().get(MOV_TIPODOC);
|
||||
@ -1870,15 +1855,15 @@ bool TMastrini_application::preprocess_page(int file, int counter)
|
||||
{
|
||||
if (_numcarat == 1)
|
||||
{
|
||||
TString app (132);
|
||||
TString app(132);
|
||||
app.spaces();
|
||||
set_row (_rw, "@0g%s", (const char*) app);
|
||||
set_row (_rw, "@0g%s", (const char*)app);
|
||||
}
|
||||
else
|
||||
{
|
||||
TString app (198);
|
||||
TString app(198);
|
||||
app.spaces();
|
||||
set_row (_rw, "@0g%s", (const char*) app);
|
||||
set_row (_rw, "@0g%s", (const char*)app);
|
||||
}
|
||||
}
|
||||
real dep_dare,dep_avere;
|
||||
@ -1919,17 +1904,17 @@ bool TMastrini_application::preprocess_page(int file, int counter)
|
||||
|
||||
if (_nummast != 3 || dep_dare != ZERO || dep_avere != ZERO)
|
||||
{
|
||||
TString dare (dep_dare.string("###.###.###.###"));
|
||||
TString avere (dep_avere.string("###.###.###.###"));
|
||||
TString dare (dep_dare.string(_real_picture));
|
||||
TString avere (dep_avere.string(_real_picture));
|
||||
if (_numcarat == 1)
|
||||
{
|
||||
set_row (_rw,"@32gA RIPORTO@85g%s", (const char*) dare);
|
||||
set_row (_rw,"@101g%s", (const char*) avere);
|
||||
set_row (_rw,"@32gA RIPORTO@83g%s", (const char*) dare);
|
||||
set_row (_rw,"@100g%s", (const char*) avere);
|
||||
}
|
||||
else
|
||||
if (_numcarat == 2)
|
||||
{
|
||||
set_row (_rw,"@32gA RIPORTO@101g%s", (const char*) dare);
|
||||
set_row (_rw,"@32gA RIPORTO@100g%s", (const char*) dare);
|
||||
set_row (_rw,"@117g%s", (const char*) avere);
|
||||
}
|
||||
}
|
||||
@ -1952,13 +1937,13 @@ bool TMastrini_application::preprocess_page(int file, int counter)
|
||||
_riporto_parziale_dare += _importo;
|
||||
|
||||
if (_numcarat == 1) // Stampa 132 caratteri
|
||||
set_row (_rw,"@85g%s", (const char*) _importo_str);
|
||||
set_row (_rw,"@83g%s", (const char*) _importo_str);
|
||||
else
|
||||
if (_numcarat == 2) // Stampa 198 caratteri
|
||||
{
|
||||
_saldo_progressivi += _importo;
|
||||
_saldo_movimenti += _importo;
|
||||
set_row (_rw,"@101g%s", (const char*) _importo_str);
|
||||
set_row (_rw,"@100g%s", (const char*) _importo_str);
|
||||
}
|
||||
}
|
||||
else if (_sezione == "A")
|
||||
@ -1967,7 +1952,7 @@ bool TMastrini_application::preprocess_page(int file, int counter)
|
||||
_riporto_parziale_avere += _importo;
|
||||
|
||||
if (_numcarat == 1) // Stampa 132 caratteri
|
||||
set_row (_rw,"@101g%s", (const char*) _importo_str);
|
||||
set_row (_rw,"@100g%s", (const char*) _importo_str);
|
||||
else
|
||||
if (_numcarat == 2) // Stampa 198 caratteri
|
||||
{
|
||||
@ -1980,17 +1965,17 @@ bool TMastrini_application::preprocess_page(int file, int counter)
|
||||
const int righe_rimaste = printer().rows_left();
|
||||
_stampato = righe_rimaste >= 1;
|
||||
|
||||
_saldo_progressivi_str=_saldo_progressivi.string("###.###.###.###");
|
||||
_saldo_movimenti_str=_saldo_movimenti.string("###.###.###.###");
|
||||
_saldo_progressivi_str=_saldo_progressivi.string(_real_picture);
|
||||
_saldo_movimenti_str=_saldo_movimenti.string(_real_picture);
|
||||
if (_numcarat == 2)
|
||||
{
|
||||
ricerca_regiva();
|
||||
_protiva = atol(_mov->curr().get(MOV_PROTIVA));
|
||||
if (_protiva != 0)
|
||||
set_row (_rw,"@189g%5d", _protiva);
|
||||
set_row (_rw,"@191g%5d", _protiva);
|
||||
|
||||
if (_tipo < 3)
|
||||
set_row (_rw,"@180g#t" , &_regiva);
|
||||
set_row (_rw,"@183g#t" , &_regiva);
|
||||
_dataregrmov = current_cursor()->curr(LF_RMOV).get_date(RMV_DATAREG);
|
||||
dataregrmovstring=_dataregrmov.string();
|
||||
|
||||
@ -2006,7 +1991,7 @@ bool TMastrini_application::preprocess_page(int file, int counter)
|
||||
if (((gruppof!=_gruppo)||(contof!=_conto)||(sottocf!=_sottoc))||(rmov.eof()))
|
||||
datasucc = ("");
|
||||
if (datasucc != _dataregrmov)
|
||||
set_row (_rw,"@133g#t", &_saldo_progressivi_str);
|
||||
set_row (_rw,"@134g#t", &_saldo_progressivi_str);
|
||||
rmov.readat(rec);
|
||||
}
|
||||
_rw = 1;
|
||||
@ -2263,7 +2248,7 @@ void TMastrini_application::stampa_totaliiva()
|
||||
TDociva& riga = (TDociva&)_b[j];
|
||||
set_row(_rw+j, "@0g%s",(const char*) riga._descrdoc);
|
||||
totale = riga._totdociva;
|
||||
TString string = totale.string("###.###.###.###");
|
||||
TString string = totale.string(_real_picture);
|
||||
set_row(_rw+j, fmt, (const char*)string);
|
||||
}
|
||||
|
||||
@ -2351,8 +2336,8 @@ bool TMastrini_application::preprocess_print(int file, int counter)
|
||||
|
||||
bool TMastrini_application::set_print(int)
|
||||
{
|
||||
_puoi_stampare = TRUE;
|
||||
|
||||
_puoi_stampare = TRUE;
|
||||
|
||||
KEY tasto;
|
||||
|
||||
// Controlla se esistono impostazioni di stampa in coda
|
||||
@ -2374,6 +2359,20 @@ bool TMastrini_application::set_print(int)
|
||||
sheet2mask(); // Estrae la prima riga dalla coda di stampa
|
||||
}
|
||||
}
|
||||
|
||||
_noseparator = _msk->get_bool(F_SEPARATOR);
|
||||
if (_noseparator)
|
||||
_real_picture = "################";
|
||||
else
|
||||
{
|
||||
#ifdef DBG
|
||||
_real_picture = "@@@@.@@@.@@@.@@@";
|
||||
#else
|
||||
_real_picture = "####.###.###.###";
|
||||
#endif
|
||||
}
|
||||
set_real_picture(_real_picture);
|
||||
|
||||
|
||||
if (tasto == K_ENTER)
|
||||
{
|
||||
@ -2459,17 +2458,13 @@ bool TMastrini_application::set_print(int)
|
||||
|
||||
switch (_tipostampa)
|
||||
{
|
||||
case 1: _totale_saldo = 1.0;
|
||||
break;
|
||||
case 2: _totale_saldo = 0.0;
|
||||
break;
|
||||
case 3: _totale_saldo = 1.0;
|
||||
break;
|
||||
case 1: _totale_saldo = 1.0; break;
|
||||
case 2: _totale_saldo = 0.0; break;
|
||||
case 3: _totale_saldo = 1.0; break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
enable_print_menu();
|
||||
|
||||
enable_link("Collegamento prima nota: ", 'r');
|
||||
|
||||
return TRUE;
|
||||
@ -2556,17 +2551,17 @@ void TMastrini_application::preprocess_footer()
|
||||
|
||||
if (_nummast != 3 || dep_dare != ZERO || dep_avere != ZERO)
|
||||
{
|
||||
TString dare (dep_dare.string("###.###.###.###"));
|
||||
TString avere (dep_avere.string("###.###.###.###"));
|
||||
TString dare (dep_dare.string(_real_picture));
|
||||
TString avere (dep_avere.string(_real_picture));
|
||||
if (_numcarat == 1)
|
||||
{
|
||||
set_footer (2,"@32gA RIPORTO@85g%s", (const char*) dare);
|
||||
set_footer (2,"@101g%s", (const char*) avere);
|
||||
set_footer (2,"@32gA RIPORTO@83g%s", (const char*) dare);
|
||||
set_footer (2,"@100g%s", (const char*) avere);
|
||||
}
|
||||
else
|
||||
if (_numcarat == 2)
|
||||
{
|
||||
set_footer (2,"@32gA RIPORTO@101g%s", (const char*) dare);
|
||||
set_footer (2,"@32gA RIPORTO@100g%s", (const char*) dare);
|
||||
set_footer (2,"@117g%s", (const char*) avere);
|
||||
}
|
||||
}
|
||||
@ -2700,22 +2695,14 @@ void TMastrini_application::crea_intestazione()
|
||||
set_header (1, "@12g%-.45s", (const char*) _ragsoc);
|
||||
set_header (1, "@59g%s", (const char*) _indulc);
|
||||
//set_header (1, "@86g%-.9s", (const char*) _civulc);
|
||||
set_header (1, "@97g%-.5s", (const char*) _capulc);
|
||||
set_header (1, "@100g%-.5s", (const char*) _capulc);
|
||||
set_header (1, "@103g%-.18s", (const char*) _com);
|
||||
set_header (1, "@122g%-.3s", (const char*) _prov);
|
||||
}
|
||||
if (_nummast == 3)
|
||||
{
|
||||
set_header (3, "@0gSottoconto@12g@b%d", _gruppo);
|
||||
set_header (3, "@16g@b%d", _conto);
|
||||
set_header (3, "@20g@b%ld", _sottoc);
|
||||
}
|
||||
set_header (3, "@0gSottoconto @b%3d %3d %6ld", _gruppo, _conto, _sottoc);
|
||||
else
|
||||
{
|
||||
set_header (3, "@0gSottoconto@12g%d", _gruppo);
|
||||
set_header (3, "@16g%d", _conto);
|
||||
set_header (3, "@20g%ld", _sottoc);
|
||||
}
|
||||
set_header (3, "@0gSottoconto %3d %3d %6ld", _gruppo, _conto, _sottoc);
|
||||
|
||||
if (_tmcf == 'C')
|
||||
_tipo_mask = 1;
|
||||
@ -2744,28 +2731,28 @@ void TMastrini_application::crea_intestazione()
|
||||
set_header (8,"Data");
|
||||
if (_stampanum < 3)
|
||||
set_header (8,"@11gnumero");
|
||||
set_header (8,"@19gData@30gNumero@38gCod.Causale@61gDescrizione@96gDare@111gAvere@117gPartita@131gC");
|
||||
set_header (8,"@19gData@30gNumero@38gCod.Causale@61gDescrizione@95gDare@111gAvere@117gPartita@131gC");
|
||||
if (_stampa_mov_prov)
|
||||
set_header(8,"@129gP");
|
||||
sep.fill('-');
|
||||
set_header (9, (const char *) sep);
|
||||
}
|
||||
else if (_numcarat == 2)
|
||||
{
|
||||
sep1.fill('-'); //Stampa 198 - (sep1(198))
|
||||
set_header (6,"@0g%s", (const char *) sep1);
|
||||
set_header (7,"Operazione@23gData@34gNumero@169gContro@180gReg@188gNumero@197gA");
|
||||
if (_stampa_mov_prov)
|
||||
set_header(7,"@195gM");
|
||||
set_header (8,"Data");
|
||||
if (_stampanum < 3)
|
||||
set_header (8,"@11gnumero");
|
||||
set_header (8,"@23gDocumento@42gCod.Causale@70gDescrizione@112gDare@127gAvere@135gSaldo progre.@152gSaldo movim.@169gPartita@180gIva@184gProtocollo@197gC");
|
||||
if (_stampa_mov_prov)
|
||||
set_header(8,"@195gP");
|
||||
sep1.fill('-');
|
||||
set_header (9,"@0g%s", (const char *) sep1);
|
||||
}
|
||||
{
|
||||
sep1.fill('-'); //Stampa 198 - (sep1(198))
|
||||
set_header (6,"@0g%s", (const char*)sep1);
|
||||
set_header (7,"Operazione@23gData@34gNumero@169gContro@183gReg@190gNumero@197gA");
|
||||
if (_stampa_mov_prov)
|
||||
set_header(7,"@195gM");
|
||||
set_header (8,"Data");
|
||||
if (_stampanum < 3)
|
||||
set_header (8,"@11gnumero");
|
||||
set_header (8,"@23gDocumento@42gCod.Causale@70gDescrizione@112gDare@127gAvere@135gSaldo progre.@152gSaldo movim.@169gPartita@183gIva@189gProtoc.@197gC");
|
||||
if (_stampa_mov_prov)
|
||||
set_header(8,"@195gP");
|
||||
sep1.fill('-');
|
||||
set_header (9,"@0g%s", (const char*)sep1);
|
||||
}
|
||||
|
||||
calcola_progressivi();
|
||||
_saldo_progressivi += _saldo_progre_prec;
|
||||
@ -2774,21 +2761,15 @@ void TMastrini_application::crea_intestazione()
|
||||
{
|
||||
if (_numcarat == 1)
|
||||
{
|
||||
TString string = _saldo_progre_prec.string("###.###.###.###");
|
||||
set_header (10,"@42gPROGRESSIVI PRECEDENTI@69g%15s",(const char*) string);
|
||||
string = _progredare.string("###.###.###.###");
|
||||
set_header (10,"@85g%15s",(const char*) string);
|
||||
string = _progreavere.string("###.###.###.###");
|
||||
set_header (10,"@101g%15s",(const char*) string);
|
||||
set_header (10,"@42gPROGRESSIVI PRECEDENTI@66g%s", _saldo_progre_prec.string(_real_picture));
|
||||
set_header (10,"@83g%s", _progredare.string(_real_picture));
|
||||
set_header (10,"@100g%s", _progreavere.string(_real_picture));
|
||||
}
|
||||
if (_numcarat == 2)
|
||||
{
|
||||
TString string = _progredare.string("###.###.###.###");
|
||||
set_header (10,"@70gPROGRESSIVI PRECEDENTI@101g%15s",(const char*)string);
|
||||
string = _progreavere.string("###.###.###.###");
|
||||
set_header (10,"@117g%15s",(const char*) string);
|
||||
string = _saldo_progre_prec.string("###.###.###.###");
|
||||
set_header (10,"@133g%15s",(const char*) string);
|
||||
set_header (10,"@70gPROGRESSIVI PRECEDENTI@100g%s", _progredare.string(_real_picture));
|
||||
set_header (10,"@117g%s", _progreavere.string(_real_picture));
|
||||
set_header (10,"@134g%s", _saldo_progre_prec.string(_real_picture));
|
||||
}
|
||||
_riporto_dare = _progredare;
|
||||
_riporto_avere = _progreavere;
|
||||
@ -2809,17 +2790,13 @@ void TMastrini_application::crea_intestazione()
|
||||
{
|
||||
if (_numcarat == 1)
|
||||
{
|
||||
TString string = dep_dare.string("###.###.###.###");
|
||||
set_header (10,"@32gA RIPORTO@85g%15s",(const char*) string);
|
||||
string = dep_avere.string("###.###.###.###");
|
||||
set_header (10,"@101g%15s",(const char*) string);
|
||||
set_header (10,"@32gA RIPORTO@83g%s", dep_dare.string(_real_picture));
|
||||
set_header (10,"@100g%s", dep_avere.string(_real_picture));
|
||||
}
|
||||
if (_numcarat == 2)
|
||||
{
|
||||
TString string = dep_dare.string("###.###.###.###");
|
||||
set_header (10,"@32gA RIPORTO@101g%15s",(const char*) string);
|
||||
string = dep_avere.string("###.###.###.###");
|
||||
set_header (10,"@117g%15s",(const char*) string);
|
||||
set_header (10,"@32gA RIPORTO@100g%s", dep_dare.string(_real_picture));
|
||||
set_header (10,"@117g%s", dep_avere.string(_real_picture));
|
||||
}
|
||||
}
|
||||
_riporto_parziale_dare = ZERO;
|
||||
@ -2889,30 +2866,23 @@ int TMastrini_application::crea_intestazione(int start_riga)
|
||||
set_row (r, "@12g%-45s", (const char*) _ragsoc);
|
||||
set_row (r, "@59g%s", (const char*) _indulc);
|
||||
//set_row (r, "@86g%-9s", (const char*) _civulc);
|
||||
set_row (r, "@97g%-5s", (const char*) _capulc);
|
||||
set_row (r, "@100g%-5s", (const char*) _capulc);
|
||||
set_row (r, "@103g%-18s", (const char*) _com);
|
||||
set_row (r, "@122g%-3s", (const char*) _prov);
|
||||
r += 2;
|
||||
}
|
||||
if (_nummast == 3)
|
||||
{
|
||||
set_row (r, "@0gSottoconto@12g@b%d", _gruppo);
|
||||
set_row (r, "@16g@b%d", _conto);
|
||||
set_row (r, "@20g@b%ld", _sottoc);
|
||||
}
|
||||
set_row (r, "@0gSottoconto@12g@b%3d %3d %6ld", _gruppo, _conto, _sottoc);
|
||||
else
|
||||
{
|
||||
set_row (r, "@0gSottoconto@12g%d", _gruppo);
|
||||
set_row (r, "@16g%d", _conto);
|
||||
set_row (r, "@20g%ld", _sottoc);
|
||||
}
|
||||
set_row (r, "@0gSottoconto@12g%3d %3d %6ld", _gruppo, _conto, _sottoc);
|
||||
|
||||
if (_tmcf == 'C')
|
||||
_tipo_mask = 1;
|
||||
else if (_tmcf == 'F')
|
||||
_tipo_mask = 2;
|
||||
else if (_tmcf == '\0')
|
||||
_tipo_mask = 3;
|
||||
else if (_tmcf == 'F')
|
||||
_tipo_mask = 2;
|
||||
else if (_tmcf == '\0')
|
||||
_tipo_mask = 3;
|
||||
|
||||
switch (_tipo_mask)
|
||||
{
|
||||
case 1: r = ricerca_clifo(r);
|
||||
@ -2936,31 +2906,30 @@ int TMastrini_application::crea_intestazione(int start_riga)
|
||||
set_row (r,"Data");
|
||||
if (_stampanum < 3)
|
||||
set_row (r,"@11gnumero");
|
||||
set_row (r++,"@19gData@30gNumero@38gCod.Causale@61gDescrizione@96gDare@111gAvere@117gPartita@131gC");
|
||||
set_row (r++,"@19gData@30gNumero@38gCod.Causale@61gDescrizione@95gDare@111gAvere@117gPartita@131gC");
|
||||
if (_stampa_mov_prov)
|
||||
set_header(r-1,"@129gP");
|
||||
sep.fill('-');
|
||||
set_row (r++,"@1g%s", (const char *) sep);
|
||||
set_row (r++,"@1g%s", (const char*)sep);
|
||||
}
|
||||
else if (_numcarat == 2)
|
||||
{
|
||||
sep1.fill('-'); //Stampa 198 - (sep1(198))
|
||||
set_row (r++,"@0g%s", (const char *) sep1);
|
||||
set_row (r++,"Operazione@23gData@34gNumero@169gContro@180gReg@188gNumero@197gA");
|
||||
if (_stampa_mov_prov)
|
||||
set_row(r-1,"@195gM");
|
||||
set_row (r,"Data");
|
||||
if (_stampanum < 3)
|
||||
set_row (r,"@11gnumero");
|
||||
set_row (r,"@23gDocumento@42gCod.Causale@70gDescrizione@112gDare@127gAvere");
|
||||
set_row (r++,"@135gSaldo progre.@152gSaldo movim.@169gPartita@180gIva@184gProtocollo@197gC");
|
||||
if (_stampa_mov_prov)
|
||||
set_row (r-1,"@195gP");
|
||||
sep1.fill('-');
|
||||
set_row (r++,"@0g%s", (const char *) sep1);
|
||||
}
|
||||
if (_pagina != np)
|
||||
_pagina = np;
|
||||
else
|
||||
{
|
||||
sep1.fill('-'); //Stampa 198 - (sep1(198))
|
||||
set_row (r++,"@0g%s", (const char*)sep1);
|
||||
set_row (r++,"Operazione@23gData@34gNumero@169gContro@183gReg@190gNumero@197gA");
|
||||
if (_stampa_mov_prov)
|
||||
set_row(r-1,"@195gM");
|
||||
set_row (r,"Data");
|
||||
if (_stampanum < 3)
|
||||
set_row (r,"@11gnumero");
|
||||
set_row (r,"@23gDocumento@42gCod.Causale@70gDescrizione@112gDare@127gAvere");
|
||||
set_row (r++,"@135gSaldo progre.@152gSaldo movim.@169gPartita@183gIva@189gProtoc.@197gC");
|
||||
if (_stampa_mov_prov)
|
||||
set_row (r-1,"@195gP");
|
||||
sep1.fill('-');
|
||||
set_row (r++,"@0g%s", (const char*)sep1);
|
||||
}
|
||||
_pagina = np;
|
||||
return r;
|
||||
}
|
||||
|
||||
@ -2993,17 +2962,13 @@ void TMastrini_application::stampa_progre_riporto()
|
||||
{
|
||||
if (_numcarat == 1)
|
||||
{
|
||||
TString string = dep_dare.string("###.###.###.###");
|
||||
set_row (_rw,"@32gA RIPORTO@85g%15s",(const char*) string);
|
||||
string = dep_avere.string("###.###.###.###");
|
||||
set_row (_rw++,"@101g%15s",(const char*) string);
|
||||
set_row (_rw,"@32gA RIPORTO@83g%r", &dep_dare);
|
||||
set_row (_rw++,"@100g%r",&dep_avere);
|
||||
}
|
||||
if (_numcarat == 2)
|
||||
{
|
||||
TString string = dep_dare.string("###.###.###.###");
|
||||
set_row (_rw,"@32gA RIPORTO@101g%15s",(const char*) string);
|
||||
string = dep_avere.string("###.###.###.###");
|
||||
set_row (_rw++,"@117g%15s",(const char*) string);
|
||||
set_row (_rw,"@32gA RIPORTO@100g%r", &dep_dare);
|
||||
set_row (_rw++,"@117g%r", &dep_avere);
|
||||
}
|
||||
}
|
||||
_riporto_parziale_dare = ZERO;
|
||||
@ -3012,13 +2977,13 @@ void TMastrini_application::stampa_progre_riporto()
|
||||
if (_numcarat == 1)
|
||||
{
|
||||
sep ="";
|
||||
set_row(_rw,"@1g%s",(const char*) sep);
|
||||
set_row(_rw,"@1g%s",(const char*)sep);
|
||||
}
|
||||
else
|
||||
{
|
||||
sep1 ="";
|
||||
set_row(_rw,"@1g%s",(const char*)sep1);
|
||||
}
|
||||
else if (_numcarat == 2)
|
||||
{
|
||||
sep1 ="";
|
||||
set_row(_rw,"@1g%s",(const char*) sep1);
|
||||
}
|
||||
}
|
||||
|
||||
int TMastrini_application::stampa_progre_riporto(int start_riga)
|
||||
@ -3048,17 +3013,13 @@ int TMastrini_application::stampa_progre_riporto(int start_riga)
|
||||
{
|
||||
if (_numcarat == 1)
|
||||
{
|
||||
TString string = dep_dare.string("###.###.###.###");
|
||||
set_row (r,"@32gA RIPORTO@85g%15s",(const char*) string);
|
||||
string = dep_avere.string("###.###.###.###");
|
||||
set_row (r++,"@101g%15s",(const char*) string);
|
||||
set_row (r,"@32gA RIPORTO@83g%r", &dep_dare);
|
||||
set_row (r++,"@100g%r", &dep_avere);
|
||||
}
|
||||
if (_numcarat == 2)
|
||||
{
|
||||
TString string = dep_dare.string("###.###.###.###");
|
||||
set_row (r,"@32gA RIPORTO@101g%15s",(const char*) string);
|
||||
string = dep_avere.string("###.###.###.###");
|
||||
set_row (r++,"@117g%15s",(const char*) string);
|
||||
set_row (r,"@32gA RIPORTO@100g%r", &dep_dare);
|
||||
set_row (r++,"@117g%r", &dep_avere);
|
||||
}
|
||||
}
|
||||
_riporto_parziale_dare = ZERO;
|
||||
@ -3069,11 +3030,11 @@ int TMastrini_application::stampa_progre_riporto(int start_riga)
|
||||
sep ="";
|
||||
set_row(r++,"@1g%s",(const char*) sep);
|
||||
}
|
||||
else if (_numcarat == 2)
|
||||
{
|
||||
sep1 ="";
|
||||
set_row(r++,"@1g%s",(const char*) sep1);
|
||||
}
|
||||
else
|
||||
{
|
||||
sep1 ="";
|
||||
set_row(r++,"@1g%s",(const char*) sep1);
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
@ -3311,24 +3272,17 @@ void TMastrini_application::stampa_progressivi()
|
||||
_rw = 1;
|
||||
|
||||
if (_numcarat == 1)
|
||||
{
|
||||
TString string = _saldo_progre_prec.string("###.###.###.###");
|
||||
set_row (_rw,"@42gPROGRESSIVI PRECEDENTI@69g%15s",(const char*) string);
|
||||
string = _progredare.string("###.###.###.###");
|
||||
set_row (_rw,"@85g%15s",(const char*) string);
|
||||
string = _progreavere.string("###.###.###.###");
|
||||
set_row (_rw++,"@101g%15s",(const char*) string);
|
||||
}
|
||||
|
||||
if (_numcarat == 2)
|
||||
{
|
||||
TString string = _progredare.string("###.###.###.###");
|
||||
set_row (_rw,"@70gPROGRESSIVI PRECEDENTI@101g%15s",(const char*)string);
|
||||
string = _progreavere.string("###.###.###.###");
|
||||
set_row (_rw,"@117g%15s",(const char*) string);
|
||||
string = _saldo_progre_prec.string("###.###.###.###");
|
||||
set_row (_rw++,"@133g%15s",(const char*) string);
|
||||
}
|
||||
{
|
||||
set_row (_rw,"@42gPROGRESSIVI PRECEDENTI@66g%r", &_saldo_progre_prec);
|
||||
set_row (_rw,"@83g%r", &_progredare);
|
||||
set_row (_rw++,"@100g%r", &_progreavere);
|
||||
}
|
||||
else
|
||||
{
|
||||
set_row (_rw,"@70gPROGRESSIVI PRECEDENTI@100g%r", &_progredare);
|
||||
set_row (_rw,"@117g%r", &_progreavere);
|
||||
set_row (_rw++,"@134g%r", &_saldo_progre_prec);
|
||||
}
|
||||
}
|
||||
|
||||
int TMastrini_application::stampa_progressivi(int start_riga)
|
||||
@ -3336,24 +3290,17 @@ int TMastrini_application::stampa_progressivi(int start_riga)
|
||||
int r = start_riga;
|
||||
|
||||
if (_numcarat == 1)
|
||||
{
|
||||
TString string = _saldo_progre_prec.string("###.###.###.###");
|
||||
set_row (r,"@42gPROGRESSIVI PRECEDENTI@69g%15s",(const char*) string);
|
||||
string = _progredare.string("###.###.###.###");
|
||||
set_row (r,"@85g%15s",(const char*) string);
|
||||
string = _progreavere.string("###.###.###.###");
|
||||
set_row (r++,"@101g%15s",(const char*) string);
|
||||
}
|
||||
|
||||
if (_numcarat == 2)
|
||||
{
|
||||
TString string = _progredare.string("###.###.###.###");
|
||||
set_row (r,"@70gPROGRESSIVI PRECEDENTI@101g%15s",(const char*)string);
|
||||
string = _progreavere.string("###.###.###.###");
|
||||
set_row (r,"@117g%15s",(const char*) string);
|
||||
string = _saldo_progre_prec.string("###.###.###.###");
|
||||
set_row (r++,"@133g%15s",(const char*) string);
|
||||
}
|
||||
{
|
||||
set_row (r,"@42gPROGRESSIVI PRECEDENTI@66g%r", &_saldo_progre_prec);
|
||||
set_row (r,"@83g%r", &_progredare);
|
||||
set_row (r++,"@100g%r", &_progreavere);
|
||||
}
|
||||
else
|
||||
{
|
||||
set_row (r,"@70gPROGRESSIVI PRECEDENTI@100g%r", &_progredare);
|
||||
set_row (r,"@117g%r", &_progreavere);
|
||||
set_row (r++,"@134g%r", &_saldo_progre_prec);
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
@ -3485,7 +3432,7 @@ void TMastrini_application::ricerca_clifo()
|
||||
|
||||
set_header (5, "@33gP.I.@37g%-11s",(const char*) paiv);
|
||||
set_header (5, "@49gCF@52g%-16s",(const char*) cofi);
|
||||
set_header (5, "@69g%-.25s",(const char*) indcf);
|
||||
set_header (5, "@66g%-.25s",(const char*) indcf);
|
||||
set_header (5, "@95g%-5s",(const char*) capcf);
|
||||
set_header (5, "@101g%-.24s",(const char*) dencom);
|
||||
set_header (5, "@126g%-5s",(const char*) provcom);
|
||||
@ -3624,7 +3571,7 @@ int TMastrini_application::ricerca_clifo(int start)
|
||||
|
||||
set_row (r, "@33gP.I.@37g%-11s",(const char*) paiv);
|
||||
set_row (r, "@49gCF@52g%-16s",(const char*) cofi);
|
||||
set_row (r, "@69g%-.25s",(const char*) indcf);
|
||||
set_row (r, "@66g%-.25s",(const char*) indcf);
|
||||
set_row (r, "@95g%-5s",(const char*) capcf);
|
||||
set_row (r, "@101g%-.24s",(const char*) dencom);
|
||||
set_row (r, "@126g%-5s",(const char*) provcom);
|
||||
@ -3970,8 +3917,6 @@ bool TMastrini_application::user_create()
|
||||
exp.add("SOTTOCONTO=SOTTOCONTO");
|
||||
_rel->add(LF_RMOV,exp,2,LF_SALDI);
|
||||
|
||||
|
||||
// _cur1=add_cursor(new TCursor(_rel,"FLSCA=\"F\"",2));
|
||||
_cur1=add_cursor(new TCursor(_rel,"FLSCA=\" \"",2));
|
||||
_nditte = new TLocalisamfile (LF_NDITTE);
|
||||
_unloc = new TLocalisamfile (LF_UNLOC);
|
||||
@ -4021,16 +3966,12 @@ bool TMastrini_application::user_destroy()
|
||||
delete _d30;
|
||||
|
||||
return TRUE;
|
||||
|
||||
}
|
||||
|
||||
int cg3200(int argc, char* argv[])
|
||||
{
|
||||
|
||||
TMastrini_application a;
|
||||
|
||||
a.run(argc, argv, "Stampa Mastrini");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -36,6 +36,7 @@
|
||||
#define F_STAMPATOTIVA 114
|
||||
#define F_TIPOSTAMPA 115
|
||||
#define F_STAMPAMOVPROV 116
|
||||
#define F_SEPARATOR 117
|
||||
#define F_MEMORIZZA 500
|
||||
#define F_NUMCARAT 501
|
||||
#define F_NUMMAST 502
|
||||
|
@ -453,6 +453,11 @@ BEGIN
|
||||
PROMPT 4 13 "Stampa movimenti provvisori"
|
||||
END
|
||||
|
||||
BOOLEAN F_SEPARATOR
|
||||
BEGIN
|
||||
PROMPT 4 14 "Non stampare il separatore delle migliaia"
|
||||
END
|
||||
|
||||
LIST F_STAMPANUM 15
|
||||
BEGIN
|
||||
PROMPT 4 15 "Stampa numerazione "
|
||||
|
@ -28,8 +28,7 @@
|
||||
#include "cg3400a.h"
|
||||
#include "cg3400b.h"
|
||||
|
||||
HIDDEN const char* TOT_PICTURE = "#.###.###.###.###";
|
||||
HIDDEN const char* REAL_PICTURE = "###.###.###.###";
|
||||
HIDDEN const char* REAL_PICTURE = "###.###.###.###.###";
|
||||
|
||||
HIDDEN const int RIGHE_FOOTER = 3;
|
||||
|
||||
@ -40,13 +39,13 @@ HIDDEN const int POSCONTO = 74;
|
||||
|
||||
HIDDEN const int DARE132 = 95;
|
||||
HIDDEN const int AVERE132 = 112;
|
||||
HIDDEN const int DARE198 = 150;
|
||||
HIDDEN const int DARE198 = 152;
|
||||
HIDDEN const int AVERE198 = 174;
|
||||
|
||||
const int SCRITTA = 26; // prima era 29
|
||||
const int TOTDARE132 = 88; // prima era 92
|
||||
const int SEZA132 = 108; // prima era 111
|
||||
const int TOTAVERE132 = 110; // prima era 112
|
||||
HIDDEN const int SCRITTA = 26;
|
||||
HIDDEN const int TOTDARE132 = 84;
|
||||
HIDDEN const int SEZA132 = 108;
|
||||
HIDDEN const int TOTAVERE132 = 110;
|
||||
|
||||
HIDDEN enum descr { causale, conto, operazione };
|
||||
|
||||
@ -440,8 +439,8 @@ int TStampa_giornale::set_totali_giorno(const TDate& data, const int righeiva)
|
||||
// Se e' l'unico totale lo stampo anche se e' zero
|
||||
if (competenza_ec() || (_tot_avere_gg != ZERO || _tot_dare_gg != ZERO))
|
||||
{
|
||||
TString td(_tot_dare_gg.string (TOT_PICTURE));
|
||||
TString ta(_tot_avere_gg.string(TOT_PICTURE));
|
||||
TString td(_tot_dare_gg.string (REAL_PICTURE));
|
||||
TString ta(_tot_avere_gg.string(REAL_PICTURE));
|
||||
|
||||
sprintf(dep, "@b@%dgTotale operazioni del %s @%dg%c %s @%dg%c @%dg%s",
|
||||
_stampa_width == 132 ? SCRITTA : DARE198-STACC,
|
||||
@ -449,7 +448,7 @@ int TStampa_giornale::set_totali_giorno(const TDate& data, const int righeiva)
|
||||
_stampa_width == 132 ? TOTDARE132 : DARE198-2,
|
||||
'D',
|
||||
(const char*)td,
|
||||
_stampa_width == 132 ? SEZA132 : DARE198+20,
|
||||
_stampa_width == 132 ? SEZA132 : AVERE198-2,
|
||||
'A',
|
||||
_stampa_width == 132 ? TOTAVERE132 : AVERE198,
|
||||
(const char*)ta
|
||||
@ -461,8 +460,8 @@ int TStampa_giornale::set_totali_giorno(const TDate& data, const int righeiva)
|
||||
|
||||
if (competenza_ep() || (_tot_avere_gg_ap != ZERO || _tot_dare_gg_ap != ZERO))
|
||||
{
|
||||
TString tdp(_tot_dare_gg_ap.string(TOT_PICTURE));
|
||||
TString tap(_tot_avere_gg_ap.string(TOT_PICTURE));
|
||||
TString tdp(_tot_dare_gg_ap.string(REAL_PICTURE));
|
||||
TString tap(_tot_avere_gg_ap.string(REAL_PICTURE));
|
||||
|
||||
sprintf (dep, "@b@%dgTotale operazioni del %s Anno precedente @%dg%c %s @%dg%c @%dg%s",
|
||||
_stampa_width == 132 ? SCRITTA : DARE198-STACC,
|
||||
@ -470,7 +469,7 @@ int TStampa_giornale::set_totali_giorno(const TDate& data, const int righeiva)
|
||||
_stampa_width == 132 ? TOTDARE132 : DARE198-2,
|
||||
'D',
|
||||
(const char*)tdp,
|
||||
_stampa_width == 132 ? SEZA132 : DARE198+20,
|
||||
_stampa_width == 132 ? SEZA132 : AVERE198-2,
|
||||
'A',
|
||||
_stampa_width == 132 ? TOTAVERE132 : AVERE198,
|
||||
(const char*)tap
|
||||
@ -512,8 +511,8 @@ void TStampa_giornale::preprocess_footer()
|
||||
|
||||
if (_tot_avere_progr_ap != ZERO || _tot_dare_progr_ap != ZERO)
|
||||
{
|
||||
progr_dare_ap = _tot_dare_progr_ap.string(TOT_PICTURE);
|
||||
progr_avere_ap = _tot_avere_progr_ap.string(TOT_PICTURE);
|
||||
progr_dare_ap = _tot_dare_progr_ap.string(REAL_PICTURE);
|
||||
progr_avere_ap = _tot_avere_progr_ap.string(REAL_PICTURE);
|
||||
ap = TRUE;
|
||||
}
|
||||
|
||||
@ -535,8 +534,8 @@ void TStampa_giornale::preprocess_footer()
|
||||
{
|
||||
dt = _tot_dare_progr + _tot_dare_progr_ap;
|
||||
at = _tot_avere_progr + _tot_avere_progr_ap;
|
||||
dts = dt.string(TOT_PICTURE);
|
||||
ats = at.string(TOT_PICTURE);
|
||||
dts = dt.string(REAL_PICTURE);
|
||||
ats = at.string(REAL_PICTURE);
|
||||
|
||||
riga.format ("@b@%dg%s@%dg%c %s @%dg%c @%dg%s",
|
||||
_stampa_width == 132 ? SCRITTA : DARE198-STUMB,
|
||||
@ -545,7 +544,7 @@ void TStampa_giornale::preprocess_footer()
|
||||
_stampa_width == 132 ? TOTDARE132 : DARE198,
|
||||
'D',
|
||||
(const char *) dts,
|
||||
_stampa_width == 132 ? SEZA132 : DARE198+20,
|
||||
_stampa_width == 132 ? SEZA132 : AVERE198-2,
|
||||
'A',
|
||||
_stampa_width == 132 ? TOTAVERE132 : AVERE198,
|
||||
(const char *) ats);
|
||||
@ -572,8 +571,8 @@ int TStampa_giornale::set_totali_pagina(int righe)
|
||||
|
||||
if (_tot_avere_progr_ap != ZERO || _tot_dare_progr_ap != ZERO)
|
||||
{
|
||||
progr_dare_ap = _tot_dare_progr_ap.string(TOT_PICTURE);
|
||||
progr_avere_ap = _tot_avere_progr_ap.string(TOT_PICTURE);
|
||||
progr_dare_ap = _tot_dare_progr_ap.string(REAL_PICTURE);
|
||||
progr_avere_ap = _tot_avere_progr_ap.string(REAL_PICTURE);
|
||||
ap = TRUE;
|
||||
}
|
||||
|
||||
@ -582,15 +581,15 @@ int TStampa_giornale::set_totali_pagina(int righe)
|
||||
// I totali distinti tra anno precedente e corrente SOLO SE STAMPA DI PROVA
|
||||
if (!_stampa_definitiva)
|
||||
{
|
||||
progr_dare = _tot_dare_progr.string (TOT_PICTURE);
|
||||
progr_avere = _tot_avere_progr.string(TOT_PICTURE);
|
||||
progr_dare = _tot_dare_progr.string (REAL_PICTURE);
|
||||
progr_avere = _tot_avere_progr.string(REAL_PICTURE);
|
||||
riga = "";
|
||||
riga.format("@b@%dgTotale progressivi @%dg%c %s @%dg%c @%dg%s",
|
||||
_stampa_width == 132 ? SCRITTA : DARE198-STUMB,
|
||||
_stampa_width == 132 ? TOTDARE132 : DARE198-2,
|
||||
'D',
|
||||
(const char *) progr_dare,
|
||||
_stampa_width == 132 ? SEZA132 : DARE198+20,
|
||||
_stampa_width == 132 ? SEZA132 : AVERE198-2,
|
||||
'A',
|
||||
_stampa_width == 132 ? TOTAVERE132 : AVERE198,
|
||||
(const char *) progr_avere
|
||||
@ -605,7 +604,7 @@ int TStampa_giornale::set_totali_pagina(int righe)
|
||||
_stampa_width == 132 ? TOTDARE132 : DARE198-2,
|
||||
'D',
|
||||
(const char *) progr_dare_ap,
|
||||
_stampa_width == 132 ? SEZA132 : DARE198+20,
|
||||
_stampa_width == 132 ? SEZA132 : AVERE198-2,
|
||||
'A',
|
||||
_stampa_width == 132 ? TOTAVERE132 : AVERE198,
|
||||
(const char *) progr_avere_ap
|
||||
@ -616,15 +615,15 @@ int TStampa_giornale::set_totali_pagina(int righe)
|
||||
|
||||
_tot_dare_generale = _tot_dare_progr + _tot_dare_progr_ap;
|
||||
_tot_avere_generale = _tot_avere_progr + _tot_avere_progr_ap;
|
||||
dts = _tot_dare_generale.string (TOT_PICTURE);
|
||||
ats = _tot_avere_generale.string(TOT_PICTURE);
|
||||
dts = _tot_dare_generale.string (REAL_PICTURE);
|
||||
ats = _tot_avere_generale.string(REAL_PICTURE);
|
||||
|
||||
riga.format("@b@%dgTotale progressivi generali @%dg%c %s @%dg%c @%dg%s",
|
||||
_stampa_width == 132 ? SCRITTA : DARE198-STUMB,
|
||||
_stampa_width == 132 ? TOTDARE132 : DARE198-2,
|
||||
'D',
|
||||
(const char *) dts,
|
||||
_stampa_width == 132 ? SEZA132 : DARE198+20,
|
||||
_stampa_width == 132 ? SEZA132 : AVERE198-2,
|
||||
'A',
|
||||
_stampa_width == 132 ? TOTAVERE132 : AVERE198,
|
||||
(const char *) ats
|
||||
@ -644,8 +643,8 @@ int TStampa_giornale::set_totali_pagina(int righe)
|
||||
|
||||
dt = _tot_dare_progr + _tot_dare_progr_ap;
|
||||
at = _tot_avere_progr + _tot_avere_progr_ap;
|
||||
dts = dt.string(TOT_PICTURE);
|
||||
ats = at.string(TOT_PICTURE);
|
||||
dts = dt.string(REAL_PICTURE);
|
||||
ats = at.string(REAL_PICTURE);
|
||||
|
||||
// "Se il mese e' finito devo scrivere Totale progressivi generali
|
||||
// invece che A riportare"
|
||||
@ -655,7 +654,7 @@ int TStampa_giornale::set_totali_pagina(int righe)
|
||||
_stampa_width == 132 ? TOTDARE132 : DARE198-2,
|
||||
'D',
|
||||
(const char *) dts,
|
||||
_stampa_width == 132 ? SEZA132 : DARE198+20,
|
||||
_stampa_width == 132 ? SEZA132 : AVERE198-2,
|
||||
'A',
|
||||
_stampa_width == 132 ? TOTAVERE132 : AVERE198,
|
||||
(const char *) ats);
|
||||
@ -791,8 +790,8 @@ void TStampa_giornale::preprocess_header()
|
||||
return;
|
||||
}
|
||||
|
||||
TString dare (riporto_dare.string (TOT_PICTURE));
|
||||
TString avere(riporto_avere.string(TOT_PICTURE));
|
||||
TString dare (riporto_dare.string (REAL_PICTURE));
|
||||
TString avere(riporto_avere.string(REAL_PICTURE));
|
||||
|
||||
riporto.format("@b@%dgRiporto: @%dg%c %17s @%dg%c@%dg%17s", // prima erano %15s
|
||||
_stampa_width == 132 ? SCRITTA : DARE198-11,
|
||||
@ -1175,15 +1174,14 @@ void TStampa_giornale::set_rows (int file, int counter)
|
||||
|
||||
if (_stampa_width == 132)
|
||||
{
|
||||
set_row (r, "@110g%r", &_importo); // prima era 110
|
||||
set_row (r, "@128g%c", _sezione);
|
||||
set_row (r, "@110g%r %c", &_importo, _sezione);
|
||||
}
|
||||
else // stampa_width == 198
|
||||
set_row (r, _sezione == 'D' ? "@152g%r" : "@174g%r", &_importo); // il primo era 150
|
||||
set_row (r, _sezione == 'D' ? "@152g%r" : "@174g%r", &_importo);
|
||||
|
||||
if (_MovGiaStampato && !_stampa_definitiva)
|
||||
set_row(r,format("@%dg*",_stampa_width == 132 ? 131 : 197));
|
||||
|
||||
|
||||
{
|
||||
const int rows = rdes - 1;
|
||||
const int left = printer().rows_left();
|
||||
@ -1807,8 +1805,7 @@ void TStampa_giornale::init_print()
|
||||
|
||||
for (int i=1; i<RIGHE_FOOTER; i++) set_footer(i, "%s", " ");
|
||||
|
||||
// set_real_picture (REAL_PICTURE);
|
||||
set_real_picture (TOT_PICTURE);
|
||||
set_real_picture (REAL_PICTURE);
|
||||
set_print_zero(TRUE);
|
||||
|
||||
if (_stampa_width == 1)
|
||||
|
115
cg/cg3500.cpp
115
cg/cg3500.cpp
@ -39,7 +39,7 @@
|
||||
|
||||
typedef enum {stampagruppo, stampaconto, stampasottoconto, fine} tipo;
|
||||
|
||||
class CG3500_application : public TPrintapp
|
||||
class TStampa_riepilogo : public TPrintapp
|
||||
{
|
||||
TProgind * _prog;
|
||||
TSaldi_list* _lista;
|
||||
@ -81,10 +81,11 @@ public:
|
||||
int stampa_intestazione_ditta();
|
||||
TDate UltimaData(int,int,long);
|
||||
|
||||
CG3500_application() {}
|
||||
TStampa_riepilogo() { }
|
||||
virtual ~TStampa_riepilogo() { }
|
||||
};
|
||||
|
||||
bool CG3500_application::riepilogo()
|
||||
bool TStampa_riepilogo::riepilogo()
|
||||
{
|
||||
TSaldo sld;
|
||||
int g, c, gp, cp, indbil;
|
||||
@ -94,7 +95,7 @@ bool CG3500_application::riepilogo()
|
||||
real saldo_conto,prg_conto_dare,prg_conto_avere,saldo_gruppo,prg_gruppo_dare,prg_gruppo_avere,prg_dare,prg_avere,saldo;
|
||||
|
||||
CHECK(_tmp_saldi == NULL, "La minchia che riapro cg01!");
|
||||
_tmp_saldi = new TIsamtempfile(LF_SALDI, "cg01", 2);
|
||||
_tmp_saldi = new TIsamtempfile(LF_SALDI, "cg01", TRUE, TRUE);
|
||||
|
||||
gp=-1;
|
||||
cp=-1;
|
||||
@ -356,7 +357,7 @@ bool CG3500_application::riepilogo()
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool CG3500_application::ricerca_cf(TConto& conto,int indbil,real& prg_conto_dare,real& prg_conto_avere)
|
||||
bool TStampa_riepilogo::ricerca_cf(TConto& conto,int indbil,real& prg_conto_dare,real& prg_conto_avere)
|
||||
{
|
||||
TSaldo sld;
|
||||
bool esiste_sc = FALSE;
|
||||
@ -421,9 +422,13 @@ bool CG3500_application::ricerca_cf(TConto& conto,int indbil,real& prg_conto_dar
|
||||
return esiste_sc;
|
||||
}
|
||||
|
||||
bool CG3500_application::preprocess_print(int file, int counter)
|
||||
{
|
||||
set_real_picture ("###.###.###.###");
|
||||
bool TStampa_riepilogo::preprocess_print(int file, int counter)
|
||||
{
|
||||
#ifdef DBG
|
||||
set_real_picture ("@@@.@@@.###.###.###");
|
||||
#else
|
||||
set_real_picture ("###.###.###.###.###");
|
||||
#endif
|
||||
set_print_zero(FALSE);
|
||||
_tmp_saldi->setkey(2);
|
||||
_prg_dare_tot = 0.00;
|
||||
@ -434,7 +439,7 @@ bool CG3500_application::preprocess_print(int file, int counter)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
tipo CG3500_application::leggi_conti(int counter)
|
||||
tipo TStampa_riepilogo::leggi_conti(int counter)
|
||||
{
|
||||
TRecnotype pos;
|
||||
|
||||
@ -486,9 +491,7 @@ tipo CG3500_application::leggi_conti(int counter)
|
||||
_prg_dare = _tmp_saldi->get_real(SLD_PDARE);
|
||||
_prg_avere = _tmp_saldi->get_real(SLD_PAVERE);
|
||||
_saldo_dare = _tmp_saldi->get_real(SLD_PDAREPRO); // W96SALDI del 10-06-96
|
||||
//_saldo_dare = _tmp_saldi->get_real(SLD_PDARESCA);
|
||||
_saldo_avere = _tmp_saldi->get_real(SLD_PAVEREPRO);
|
||||
//_saldo_avere = _tmp_saldi->get_real(SLD_PAVERESCA);
|
||||
|
||||
CercaConto(_gcorr,_ccorr);
|
||||
CercaGruppo(_gcorr);
|
||||
@ -520,7 +523,7 @@ tipo CG3500_application::leggi_conti(int counter)
|
||||
return stampasottoconto;
|
||||
}
|
||||
|
||||
tipo CG3500_application::leggi_gruppi(int counter)
|
||||
tipo TStampa_riepilogo::leggi_gruppi(int counter)
|
||||
{
|
||||
TRecnotype pos;
|
||||
|
||||
@ -591,7 +594,7 @@ tipo CG3500_application::leggi_gruppi(int counter)
|
||||
}
|
||||
|
||||
|
||||
bool CG3500_application::CercaConto(int g, int c)
|
||||
bool TStampa_riepilogo::CercaConto(int g, int c)
|
||||
{
|
||||
_tmp_saldi->zero();
|
||||
_tmp_saldi->put(SLD_GRUPPO,g);
|
||||
@ -622,7 +625,7 @@ bool CG3500_application::CercaConto(int g, int c)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool CG3500_application::CercaGruppo(int g)
|
||||
bool TStampa_riepilogo::CercaGruppo(int g)
|
||||
{
|
||||
_tmp_saldi->zero();
|
||||
_tmp_saldi->put(SLD_GRUPPO,g);
|
||||
@ -652,7 +655,7 @@ bool CG3500_application::CercaGruppo(int g)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool CG3500_application::preprocess_page(int file, int counter)
|
||||
bool TStampa_riepilogo::preprocess_page(int file, int counter)
|
||||
{
|
||||
reset_print();
|
||||
|
||||
@ -685,7 +688,7 @@ bool CG3500_application::preprocess_page(int file, int counter)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void CG3500_application::postclose_print()
|
||||
void TStampa_riepilogo::postclose_print()
|
||||
{
|
||||
if (_tmp_saldi)
|
||||
{ delete _tmp_saldi; _tmp_saldi = NULL; }
|
||||
@ -693,7 +696,7 @@ void CG3500_application::postclose_print()
|
||||
//return NEXT_PAGE;
|
||||
}
|
||||
|
||||
print_action CG3500_application::postprocess_page(int file, int counter)
|
||||
print_action TStampa_riepilogo::postprocess_page(int file, int counter)
|
||||
{
|
||||
if (_tp == fine)
|
||||
return NEXT_PAGE;
|
||||
@ -701,49 +704,47 @@ print_action CG3500_application::postprocess_page(int file, int counter)
|
||||
return REPEAT_PAGE;
|
||||
}
|
||||
|
||||
void CG3500_application::setta_riga_sottoconto()
|
||||
void TStampa_riepilogo::setta_riga_sottoconto()
|
||||
{
|
||||
TString udata = _ultima_data.string();
|
||||
|
||||
//set_row(1,"%06ld", _scorr);
|
||||
set_row(1,"%6ld", _scorr);
|
||||
//set_row(1,"@i %.32s@r",(const char*) _descr);
|
||||
set_row(1," %.32s@r",(const char*) _descr);
|
||||
set_row(1," %.34s@r",(const char*) _descr);
|
||||
set_row(1,"@42g%s",(const char*) udata);
|
||||
set_row(1,"@57g%r@77g%r@97g%r@117g%r",&_prg_dare,&_prg_avere,&_saldo_dare,&_saldo_avere);
|
||||
set_row(1,"@53g%r@73g%r@93g%r@113g%r",&_prg_dare,&_prg_avere,&_saldo_dare,&_saldo_avere);
|
||||
}
|
||||
|
||||
void CG3500_application::setta_riga_conto()
|
||||
void TStampa_riepilogo::setta_riga_conto()
|
||||
{
|
||||
TString riga (132);
|
||||
TString udata = _ultima_data.string();
|
||||
int r;
|
||||
|
||||
riga = "";
|
||||
if ( (_tp == fine) && (_scelta == 1) ) r = 2;
|
||||
else r = 1;
|
||||
if ( (_tp == fine) && (_scelta == 1) )
|
||||
r = 2;
|
||||
else
|
||||
r = 1;
|
||||
|
||||
if (_scelta == 1)
|
||||
{
|
||||
set_row(r++,"%s",(const char*)riga);
|
||||
//set_row(r,"**** Totali conto %03d.%03d",_gconto,_cconto);
|
||||
set_row(r,"**** Totali conto %3d %3d",_gconto,_cconto);
|
||||
// set_row(r,"@i %.27s@r",(const char*)_descrconto);
|
||||
set_row(r," %.27s@r",(const char*)_descrconto);
|
||||
set_row(r,"**** Totali conto %3d %3d",_gconto,_cconto);
|
||||
set_row(r,"@27g%.25s@r",(const char*)_descrconto);
|
||||
|
||||
}
|
||||
if (_scelta == 2)
|
||||
{
|
||||
set_row(r,"%3d", _ccorr);
|
||||
//set_row(r,"@i %.32s@r",(const char*)_descrconto);
|
||||
set_row(r," %.32s@r",(const char*)_descrconto);
|
||||
set_row(r," %.25s@r",(const char*)_descrconto);
|
||||
set_row(r,"@42g%s",(const char*)udata);
|
||||
}
|
||||
set_row(r++,"@57g%r@77g%r@97g%r@117g%r",&_prg_dare_conto,&_prg_avere_conto,&_saldo_dare_conto,&_saldo_avere_conto);
|
||||
set_row(r++,"@53g%r@73g%r@93g%r@113g%r",&_prg_dare_conto,&_prg_avere_conto,&_saldo_dare_conto,&_saldo_avere_conto);
|
||||
if ( (_scelta == 1) || ((_scelta == 2) && (_tp == fine)) )
|
||||
set_row(r,"%s",(const char*)riga);
|
||||
}
|
||||
|
||||
void CG3500_application::setta_riga_gruppo()
|
||||
void TStampa_riepilogo::setta_riga_gruppo()
|
||||
{
|
||||
TString riga (132);
|
||||
int r = 0;
|
||||
@ -755,32 +756,27 @@ void CG3500_application::setta_riga_gruppo()
|
||||
if (_scelta == 2)
|
||||
if (_tp == fine) r = 3;
|
||||
else r = 2;
|
||||
//set_row(r,"**** TOTALI GRUPPO %3d-",_ggruppo);
|
||||
set_row(r,"**** TOTALI GRUPPO %3d ",_ggruppo);
|
||||
//set_row(r,"@i %.30s@r",(const char*)_descrgruppo);
|
||||
set_row(r," %.30s@r",(const char*)_descrgruppo);
|
||||
set_row(r++,"@57g%r@77g%r@97g%r@117g%r",&_prg_dare_gruppo,&_prg_avere_gruppo,&_saldo_dare_gruppo,&_saldo_avere_gruppo);
|
||||
set_row(r,"**** TOTALI GRUPPO %3d",_ggruppo);
|
||||
set_row(r,"@27g%.25s@r",(const char*)_descrgruppo);
|
||||
set_row(r++,"@53g%r@73g%r@93g%r@113g%r",&_prg_dare_gruppo,&_prg_avere_gruppo,&_saldo_dare_gruppo,&_saldo_avere_gruppo);
|
||||
set_row(r++,"%s",(const char*)riga);
|
||||
riga = "";
|
||||
set_row(r,"%s",(const char*)riga);
|
||||
}
|
||||
|
||||
void CG3500_application::setta_riga_totale()
|
||||
void TStampa_riepilogo::setta_riga_totale()
|
||||
{
|
||||
_saldo_tot = _prg_dare_tot - _prg_avere_tot;
|
||||
|
||||
const int r = _scelta == 1 ? 8 : 6;
|
||||
|
||||
//17/11/1995
|
||||
TString pdt(_prg_dare_tot.string("#.###.###.###.###"));
|
||||
TString pat(_prg_avere_tot.string("#.###.###.###.###"));
|
||||
set_row(r, "**** TOTALE GENERALE @55g%s@75g%s",
|
||||
(const char*)pdt, (const char*)pat);
|
||||
set_row(r, "**** TOTALE GENERALE @53g%r@73g%r", &_prg_dare_tot, &_prg_avere_tot);
|
||||
|
||||
// Guy: 10/01/97 errore MI6125
|
||||
if (_saldo_tot != 0.0)
|
||||
{
|
||||
int go = 95;
|
||||
int go = 93;
|
||||
if (_saldo_tot < 0.0)
|
||||
{
|
||||
_saldo_tot = -_saldo_tot;
|
||||
@ -788,14 +784,14 @@ void CG3500_application::setta_riga_totale()
|
||||
}
|
||||
|
||||
TString st(24);
|
||||
st << '@' << go << 'g' << _saldo_tot.string("#.###.###.###.###");
|
||||
st << '@' << go << 'g' << _saldo_tot.string("###.###.###.###.###");
|
||||
set_row(r, (const char*)st);
|
||||
}
|
||||
}
|
||||
|
||||
TDate CG3500_application::UltimaData(int g, int c, long s)
|
||||
{
|
||||
TLocalisamfile saldi(LF_SALDI, FALSE); //il parametro a false permette di usare un record corrente del file saldi differente a quello del file temporaneo
|
||||
TDate TStampa_riepilogo::UltimaData(int g, int c, long s)
|
||||
{
|
||||
TLocalisamfile saldi(LF_SALDI);
|
||||
TDate uldata;
|
||||
|
||||
saldi.zero();
|
||||
@ -815,7 +811,7 @@ TDate CG3500_application::UltimaData(int g, int c, long s)
|
||||
return uldata;
|
||||
}
|
||||
|
||||
bool CG3500_application::user_create()
|
||||
bool TStampa_riepilogo::user_create()
|
||||
{
|
||||
_clifo = new TLocalisamfile(LF_CLIFO);
|
||||
_com = new TLocalisamfile(LF_COMUNI);
|
||||
@ -827,7 +823,7 @@ bool CG3500_application::user_create()
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool CG3500_application::user_destroy()
|
||||
bool TStampa_riepilogo::user_destroy()
|
||||
{
|
||||
delete _com;
|
||||
delete _pcn;
|
||||
@ -839,19 +835,17 @@ bool CG3500_application::user_destroy()
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool CG3500_application::set_print(int)
|
||||
bool TStampa_riepilogo::set_print(int)
|
||||
{
|
||||
TMask m ("cg3500a");
|
||||
KEY tasto;
|
||||
|
||||
tasto = m.run();
|
||||
KEY tasto = m.run();
|
||||
if (tasto == K_ENTER)
|
||||
{
|
||||
_annoese = atoi(m.get(F_ANNO));
|
||||
_scelta = atoi(m.get(F_STAMPA));
|
||||
_richiesta = atoi(m.get(F_RICHIESTA));
|
||||
_data = m.get(F_DATASTAMPA);
|
||||
_prog = new TProgind(_pcn->items(),"Elaborazione in corso... prego attendere",FALSE);
|
||||
_prog = new TProgind(_pcn->items(), "Elaborazione in corso...", FALSE);
|
||||
|
||||
riepilogo();
|
||||
|
||||
@ -872,7 +866,7 @@ TRectype& cerca_com (const char * cod, TLocalisamfile *comuni)
|
||||
return comuni->curr();
|
||||
}
|
||||
|
||||
void CG3500_application::get_dati_ditta()
|
||||
void TStampa_riepilogo::get_dati_ditta()
|
||||
{
|
||||
TLocalisamfile nditte(LF_NDITTE);
|
||||
TLocalisamfile anag(LF_ANAG);
|
||||
@ -922,7 +916,7 @@ void CG3500_application::get_dati_ditta()
|
||||
}
|
||||
}
|
||||
|
||||
int CG3500_application::stampa_intestazione_ditta()
|
||||
int TStampa_riepilogo::stampa_intestazione_ditta()
|
||||
{
|
||||
int r = 1;
|
||||
TString codice_ditta;
|
||||
@ -946,7 +940,7 @@ int CG3500_application::stampa_intestazione_ditta()
|
||||
return r;
|
||||
}
|
||||
|
||||
void CG3500_application::preprocess_header()
|
||||
void TStampa_riepilogo::preprocess_header()
|
||||
{
|
||||
int r;
|
||||
reset_header();
|
||||
@ -977,11 +971,8 @@ void CG3500_application::preprocess_header()
|
||||
|
||||
int cg3500 (int argc, char* argv[])
|
||||
{
|
||||
|
||||
CG3500_application a;
|
||||
|
||||
TStampa_riepilogo a;
|
||||
a.run(argc, argv, "Stampa riepilogo gruppi/conti");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,3 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <applicat.h>
|
||||
#include <colors.h>
|
||||
#include <controls.h>
|
||||
@ -944,7 +942,7 @@ bool TMastrino::collapse(long rec)
|
||||
{
|
||||
bool ok = TRUE; // Posso eliminare?
|
||||
if (row(rec).tipo() != riga_mastrino) // Se non sono su una riga mastrino ...
|
||||
rec = pred(rec, riga_mastrino); // ... mi sposto sulla precedente
|
||||
rec = pred(rec, riga_mastrino); // ... mi sposto sulla precedente riga mastrino
|
||||
else
|
||||
ok = !expandable(rec); // Controlla che sia possibile
|
||||
|
||||
@ -2176,8 +2174,7 @@ HIDDEN void set_imp(TMask_field& f, const TImporto& imp)
|
||||
if (!imp.is_zero())
|
||||
{
|
||||
TString80 str;
|
||||
str = imp.valore().string(".");
|
||||
str << ' ' << imp.sezione();
|
||||
str.format("%s %c", imp.valore().string("."), imp.sezione());
|
||||
f.set(str);
|
||||
}
|
||||
else
|
||||
|
@ -67,16 +67,16 @@ BEGIN
|
||||
ITEM "C@1F"
|
||||
ITEM "Causale@20F"
|
||||
ITEM "Operazione@20"
|
||||
ITEM "Dare@15R"
|
||||
ITEM "Avere@15R"
|
||||
ITEM "Dare@19R"
|
||||
ITEM "Avere@19R"
|
||||
ITEM "N.Doc. \nN.Prot.@7"
|
||||
ITEM "Importo@17R"
|
||||
ITEM "Saldo Fine\nGiornata@17R"
|
||||
ITEM "Importo@21R"
|
||||
ITEM "Saldo Fine\nGiornata@21R"
|
||||
END
|
||||
|
||||
TEXT DLG_NULL
|
||||
BEGIN
|
||||
PROMPT 26 -5 "@bSaldo"
|
||||
PROMPT 23 -5 "@bSaldo"
|
||||
END
|
||||
|
||||
TEXT DLG_NULL
|
||||
@ -86,55 +86,55 @@ END
|
||||
|
||||
TEXT DLG_NULL
|
||||
BEGIN
|
||||
PROMPT 61 -5 "@bAvere"
|
||||
PROMPT 64 -5 "@bAvere"
|
||||
END
|
||||
|
||||
TEXT DLG_NULL
|
||||
BEGIN
|
||||
PROMPT 1 -4 "Progr. precedenti"
|
||||
PROMPT 1 -4 "Progr. prec."
|
||||
END
|
||||
|
||||
STRING F_TOTPRO_SAL 17
|
||||
STRING F_TOTPRO_SAL 21
|
||||
BEGIN
|
||||
PROMPT 20 -4 ""
|
||||
PROMPT 14 -4 ""
|
||||
FLAGS "DR"
|
||||
END
|
||||
|
||||
NUMBER F_TOTPRO_DAR 15
|
||||
NUMBER F_TOTPRO_DAR 19
|
||||
BEGIN
|
||||
PROMPT 39 -4 ""
|
||||
PROMPT 37 -4 ""
|
||||
PICTURE "."
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
NUMBER F_TOTPRO_AVE 15
|
||||
NUMBER F_TOTPRO_AVE 19
|
||||
BEGIN
|
||||
PROMPT 56 -4 ""
|
||||
PROMPT 58 -4 ""
|
||||
PICTURE "."
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
TEXT DLG_NULL
|
||||
BEGIN
|
||||
PROMPT 1 -3 "Tot. riga corrente"
|
||||
PROMPT 1 -3 "Tot. riga"
|
||||
END
|
||||
|
||||
STRING F_TOTRIG_SAL 17
|
||||
STRING F_TOTRIG_SAL 21
|
||||
BEGIN
|
||||
PROMPT 20 -3 ""
|
||||
PROMPT 14 -3 ""
|
||||
FLAGS "DR"
|
||||
END
|
||||
|
||||
NUMBER F_TOTRIG_DAR 15
|
||||
NUMBER F_TOTRIG_DAR 19
|
||||
BEGIN
|
||||
PROMPT 39 -3 ""
|
||||
PROMPT 37 -3 ""
|
||||
PICTURE "."
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
NUMBER F_TOTRIG_AVE 15
|
||||
NUMBER F_TOTRIG_AVE 19
|
||||
BEGIN
|
||||
PROMPT 56 -3 ""
|
||||
PROMPT 58 -3 ""
|
||||
PICTURE "."
|
||||
FLAGS "D"
|
||||
END
|
||||
@ -144,22 +144,22 @@ BEGIN
|
||||
PROMPT 1 -2 "Tot. periodo"
|
||||
END
|
||||
|
||||
STRING F_TOTPER_SAL 17
|
||||
STRING F_TOTPER_SAL 21
|
||||
BEGIN
|
||||
PROMPT 20 -2 ""
|
||||
PROMPT 14 -2 ""
|
||||
FLAGS "DR"
|
||||
END
|
||||
|
||||
NUMBER F_TOTPER_DAR 15
|
||||
NUMBER F_TOTPER_DAR 19
|
||||
BEGIN
|
||||
PROMPT 39 -2 ""
|
||||
PROMPT 37 -2 ""
|
||||
PICTURE "."
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
NUMBER F_TOTPER_AVE 15
|
||||
NUMBER F_TOTPER_AVE 19
|
||||
BEGIN
|
||||
PROMPT 56 -2 ""
|
||||
PROMPT 58 -2 ""
|
||||
PICTURE "."
|
||||
FLAGS "D"
|
||||
END
|
||||
@ -169,22 +169,22 @@ BEGIN
|
||||
PROMPT 1 -1 "Tot. attuali"
|
||||
END
|
||||
|
||||
STRING F_TOTATT_SAL 17
|
||||
STRING F_TOTATT_SAL 21
|
||||
BEGIN
|
||||
PROMPT 20 -1 ""
|
||||
PROMPT 14 -1 ""
|
||||
FLAGS "DR"
|
||||
END
|
||||
|
||||
NUMBER F_TOTATT_DAR 15
|
||||
NUMBER F_TOTATT_DAR 19
|
||||
BEGIN
|
||||
PROMPT 39 -1 ""
|
||||
PROMPT 37 -1 ""
|
||||
PICTURE "."
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
NUMBER F_TOTATT_AVE 15
|
||||
NUMBER F_TOTATT_AVE 19
|
||||
BEGIN
|
||||
PROMPT 56 -1 ""
|
||||
PROMPT 58 -1 ""
|
||||
PICTURE "."
|
||||
FLAGS "D"
|
||||
END
|
||||
|
@ -311,11 +311,9 @@ bool TAp_eser::check_esercizio(TString& cod, TDate s1, TDate f1)
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int cg4500 (int argc, char* argv[])
|
||||
{
|
||||
switch (*argv[2])
|
||||
switch (toupper(*argv[2]))
|
||||
{
|
||||
case 'C':
|
||||
{
|
||||
@ -323,15 +321,16 @@ int cg4500 (int argc, char* argv[])
|
||||
a.run(argc, argv, "Apertura nuovo esercizio");
|
||||
}
|
||||
break;
|
||||
case 'I':
|
||||
{
|
||||
TAp_iva a;
|
||||
a.run(argc, argv, "Apertura nuovo esercizio IVA");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
case 'I':
|
||||
{
|
||||
TAp_iva a;
|
||||
a.run(argc, argv, "Apertura nuovo esercizio IVA");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
error_box("Uso: cg4 -4 [C,I]");
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -95,8 +95,9 @@ bool TRiga_array::add_riga(const TRectype& rec_saldi)
|
||||
}
|
||||
if (!found)
|
||||
{
|
||||
TRectype* r = new TRectype(rec_saldi); // copia anche i valori di rec_saldi
|
||||
add(r);
|
||||
// TRectype* r = new TRectype(rec_saldi); // copia anche i valori di rec_saldi
|
||||
// add(r);
|
||||
add(rec_saldi);
|
||||
}
|
||||
return found;
|
||||
}
|
||||
@ -107,7 +108,6 @@ bool TRiga_array::add_riga(const TRectype& rec_saldi)
|
||||
|
||||
class TSaldibrowse_application : public TBrowse_application
|
||||
{
|
||||
|
||||
TMask* _msk;
|
||||
TCursor * _cur;
|
||||
TRelation * _rel,* _rel1;
|
||||
@ -116,6 +116,8 @@ class TSaldibrowse_application : public TBrowse_application
|
||||
int _anno, _annop, _g, _c;
|
||||
long _s;
|
||||
bool _saldo_conto, _saldo_gruppo, _saldo_sottoc, _scarongly;
|
||||
|
||||
TEsercizi_contabili _ese;
|
||||
|
||||
protected:
|
||||
virtual bool user_create();
|
||||
@ -165,13 +167,14 @@ void TSaldibrowse_application::init_modify_mode(TMask& m)
|
||||
m.disable(DLG_FINDREC);
|
||||
m.disable(F_ANNO);
|
||||
m.disable(F_SCARICATO);
|
||||
TString tipo(m.get(F_TIPOCF));
|
||||
|
||||
if (tipo=="C")
|
||||
const char tipo = m.get(F_TIPOCF)[0];
|
||||
if (tipo=='C')
|
||||
m.disable(F_DESCR_CLIENTE);
|
||||
else if (tipo=="F")
|
||||
else if (tipo=='F')
|
||||
m.disable(F_DESCR_FORN);
|
||||
else m.disable(F_DESCR_CONTO);
|
||||
else
|
||||
m.disable(F_DESCR_CONTO);
|
||||
}
|
||||
|
||||
bool TSaldibrowse_application::fai_filtro()
|
||||
@ -185,8 +188,7 @@ bool TSaldibrowse_application::fai_filtro()
|
||||
tipo = m.get(F_TIPOCF)[0];
|
||||
if (_anno != 0)
|
||||
{
|
||||
TEsercizi_contabili ese;
|
||||
_annop = ese.pred(_anno);
|
||||
_annop = _ese.pred(_anno);
|
||||
}
|
||||
else
|
||||
_annop = 0;
|
||||
@ -234,17 +236,11 @@ bool TSaldibrowse_application::anno_handler(TMask_field& f, KEY key)
|
||||
{
|
||||
if (key == K_TAB && f.focusdirty())
|
||||
{
|
||||
const TString16 cod_eser = f.get();
|
||||
const int anno = atoi(cod_eser);
|
||||
|
||||
const int anno = atoi(f.get());
|
||||
if (anno > 0)
|
||||
{
|
||||
app()._esc->put("CODTAB", cod_eser);
|
||||
if (app()._esc->read() != NOERR)
|
||||
{
|
||||
f.error_box("Esercizio %s non presente.", (const char *) cod_eser);
|
||||
return FALSE;
|
||||
}
|
||||
if (!app()._ese.exist(anno))
|
||||
return f.error_box("Esercizio %d non presente.", anno);
|
||||
else
|
||||
app()._anno = anno;
|
||||
}
|
||||
@ -437,24 +433,36 @@ void TSaldibrowse_application::add_r(int numrig,int a,real& slf,char sff,real& s
|
||||
|
||||
int TSaldibrowse_application::compare_rows(const TObject** o1, const TObject** o2)
|
||||
{
|
||||
TToken_string* r1 = ( TToken_string*)*o1;
|
||||
TToken_string* r2 = ( TToken_string*)*o2;
|
||||
int rt = 0;
|
||||
TToken_string* r1 = (TToken_string*)*o1;
|
||||
TToken_string* r2 = (TToken_string*)*o2;
|
||||
|
||||
/* Dick programming
|
||||
TDate d1,d2;
|
||||
TString c1,c2;
|
||||
c1.format("%04d", r1->get_int(0));
|
||||
c2.format("%04d", r2->get_int(0));
|
||||
|
||||
app()._esc->zero();
|
||||
app()._esc->put("CODTAB",c1);
|
||||
if (app()._esc->read() == NOERR) d1 = app()._esc->get_date("D0");
|
||||
else d1 = botime;
|
||||
if (app()._esc->read() == NOERR)
|
||||
d1 = app()._esc->get_date("D0");
|
||||
else
|
||||
d1 = botime;
|
||||
|
||||
app()._esc->put("CODTAB",c2);
|
||||
if (app()._esc->read() == NOERR) d2 = app()._esc->get_date("D0");
|
||||
else d2 = botime;
|
||||
|
||||
if (d1 < d2) rt = -1;
|
||||
else if (d1 > d2) rt = +1;
|
||||
if (app()._esc->read() == NOERR)
|
||||
d2 = app()._esc->get_date("D0");
|
||||
else
|
||||
d2 = botime;
|
||||
*/
|
||||
|
||||
TEsercizi_contabili& ese = app()._ese;
|
||||
int a1 = r1->get_int(0);
|
||||
TDate d1 = ese.exist(a1) ? ese[a1].inizio() : TDate(1, 1, a1);
|
||||
int a2 = r2->get_int(0);
|
||||
TDate d2 = ese.exist(a2) ? ese[a2].inizio() : TDate(1, 1, a2);
|
||||
|
||||
int rt = d1 == d2 ? 0 : (d1 < d2 ? -1 : +1);
|
||||
return rt;
|
||||
}
|
||||
|
||||
|
120
cg/cg5200a.uml
120
cg/cg5200a.uml
@ -214,193 +214,135 @@ SPREADSHEET F_SHEET_SALDI
|
||||
BEGIN
|
||||
PROMPT 0 7 ""
|
||||
ITEM "Es.@4"
|
||||
ITEM " Saldo iniziale@15"
|
||||
ITEM "Saldo iniziale@19"
|
||||
ITEM ""
|
||||
ITEM "Progr.Att.: Dare@15"
|
||||
ITEM " Avere@15"
|
||||
ITEM " Saldo@15"
|
||||
ITEM "Progr.Att.: Dare@19"
|
||||
ITEM "Avere@19"
|
||||
ITEM "Saldo@19"
|
||||
ITEM ""
|
||||
// ITEM "Progr.Mov.Elim.: Dare@15"
|
||||
// ITEM " Avere@15"
|
||||
ITEM "Saldo di chiusura@15"
|
||||
ITEM "Saldo di chiusura@19"
|
||||
ITEM ""
|
||||
ITEM "Saldo complessivo"
|
||||
ITEM ""
|
||||
ITEM "Ult.Op.: Data"
|
||||
ITEM " Numero"
|
||||
ITEM "Progr.Mov.Prov.: Dare@15"
|
||||
ITEM " Avere@15"
|
||||
ITEM " Saldo@15"
|
||||
ITEM "Progr.Mov.Prov.:Dare@19"
|
||||
ITEM "Avere@19"
|
||||
ITEM "Saldo@19"
|
||||
ITEM ""
|
||||
ITEM "Progr.Mov.Elim.: Dare@15"
|
||||
ITEM " Avere@15"
|
||||
ITEM "Progr.Mov.Elim.:Dare@19"
|
||||
ITEM "Avere@19"
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
||||
|
||||
PAGE "" -1 -1 70 16
|
||||
PAGE "" -1 -1 78 16
|
||||
|
||||
NUMBER 101 4
|
||||
BEGIN
|
||||
PROMPT 1 1 "Codice esercizio "
|
||||
HELP "Codice esercizio a cui si riferisce il saldo"
|
||||
FLAGS "R"
|
||||
END
|
||||
|
||||
NUMBER 102 15
|
||||
NUMBER 102 19
|
||||
BEGIN
|
||||
PROMPT 1 3 "Saldo Iniziale "
|
||||
HELP "Importo del saldo iniziale"
|
||||
FLAGS "R"
|
||||
PICTURE "."
|
||||
END
|
||||
|
||||
STRING 103 1
|
||||
BEGIN
|
||||
PROMPT 44 3 ""
|
||||
HELP "Sezione del saldo iniziale"
|
||||
FLAGS ""
|
||||
PROMPT 48 3 ""
|
||||
END
|
||||
|
||||
NUMBER 104 15
|
||||
NUMBER 104 19
|
||||
BEGIN
|
||||
PROMPT 1 4 "Progr.Attuali: Dare "
|
||||
HELP "Progressivo dare attuale del conto da visualizzare"
|
||||
FLAGS "R"
|
||||
PICTURE "."
|
||||
END
|
||||
|
||||
NUMBER 105 15
|
||||
NUMBER 105 19
|
||||
BEGIN
|
||||
PROMPT 47 4 "Avere "
|
||||
HELP "Progressivo avere attuale del conto da visualizzare"
|
||||
FLAGS "R"
|
||||
PROMPT 51 4 "Avere "
|
||||
PICTURE "."
|
||||
END
|
||||
|
||||
NUMBER 106 15
|
||||
NUMBER 106 19
|
||||
BEGIN
|
||||
PROMPT 22 5 "Saldo "
|
||||
HELP "Saldo attuale del conto"
|
||||
FLAGS "R"
|
||||
PICTURE "."
|
||||
END
|
||||
|
||||
STRING 107 1
|
||||
BEGIN
|
||||
PROMPT 44 5 ""
|
||||
FLAGS "R"
|
||||
HELP "Sezione del saldo attuale del conto"
|
||||
PROMPT 48 5 ""
|
||||
END
|
||||
|
||||
/* =====================================================================
|
||||
NUMBER 108 15
|
||||
BEGIN
|
||||
PROMPT 1 6 "Progr.Mov.Eliminati: Dare "
|
||||
HELP "Progressivi dare attuali dei movimenti eliminati"
|
||||
FLAGS "R"
|
||||
PICTURE "."
|
||||
END
|
||||
|
||||
NUMBER 109 15
|
||||
BEGIN
|
||||
PROMPT 47 6 "Avere "
|
||||
HELP "Progressivi avere attuali dei movimenti eliminati"
|
||||
FLAGS "R"
|
||||
PICTURE "."
|
||||
END
|
||||
=======================================================================*/
|
||||
|
||||
NUMBER 108 15
|
||||
NUMBER 108 19
|
||||
BEGIN
|
||||
PROMPT 1 6 " Saldo di chiusura "
|
||||
HELP "Saldo di chiusura"
|
||||
FLAGS "R"
|
||||
PICTURE "."
|
||||
END
|
||||
|
||||
STRING 109 1
|
||||
BEGIN
|
||||
PROMPT 44 6 ""
|
||||
HELP "Sezione del saldo di chiusura"
|
||||
FLAGS "R"
|
||||
PROMPT 48 6 ""
|
||||
END
|
||||
|
||||
NUMBER 110 15
|
||||
NUMBER 110 19
|
||||
BEGIN
|
||||
PROMPT 1 7 "Saldo complessivo "
|
||||
HELP "Saldo complessivo attuale del conto"
|
||||
FLAGS "R"
|
||||
PICTURE "."
|
||||
END
|
||||
|
||||
STRING 111 1
|
||||
BEGIN
|
||||
PROMPT 44 7 ""
|
||||
HELP "Sezione del saldo attuale complessivo del conto"
|
||||
FLAGS "R"
|
||||
PROMPT 48 7 ""
|
||||
END
|
||||
|
||||
DATE 112
|
||||
BEGIN
|
||||
PROMPT 1 8 "Ultima data operazione "
|
||||
HELP "Ultima data di registrazione che ha movimentato il conto"
|
||||
FLAGS "R"
|
||||
END
|
||||
|
||||
NUMBER 113 7
|
||||
BEGIN
|
||||
PROMPT 1 9 "Ultimo numero operazione "
|
||||
HELP "Ultimo numero di registrazione che ha movimentato il conto"
|
||||
FLAGS "R"
|
||||
END
|
||||
|
||||
NUMBER 114 15
|
||||
NUMBER 114 19
|
||||
BEGIN
|
||||
PROMPT 1 10 "Progr.Mov.Provvisori: Dare "
|
||||
HELP "Progressivi dare attuali dei movimenti provvisori"
|
||||
FLAGS "R"
|
||||
PICTURE "."
|
||||
END
|
||||
|
||||
NUMBER 115 15
|
||||
NUMBER 115 19
|
||||
BEGIN
|
||||
PROMPT 47 10 "Avere "
|
||||
HELP "Progressivi avere attuali dei movimenti provvisori del conto"
|
||||
FLAGS "R"
|
||||
PROMPT 51 10 "Avere "
|
||||
PICTURE "."
|
||||
END
|
||||
|
||||
NUMBER 116 15
|
||||
NUMBER 116 19
|
||||
BEGIN
|
||||
PROMPT 1 11 "Saldo "
|
||||
HELP "Saldo dei progressivi dei movimenti provvisori del conto"
|
||||
FLAGS "R"
|
||||
PICTURE "."
|
||||
END
|
||||
|
||||
STRING 117 1
|
||||
BEGIN
|
||||
PROMPT 44 11 ""
|
||||
HELP "Sezione del saldo progressivi dei movimenti provvisori del conto"
|
||||
FLAGS "R"
|
||||
PROMPT 48 11 ""
|
||||
END
|
||||
|
||||
NUMBER 118 15
|
||||
NUMBER 118 19
|
||||
BEGIN
|
||||
PROMPT 1 12 "Progr.Mov.Eliminati: Dare "
|
||||
HELP "Progressivi dare attuali dei movimenti eliminati"
|
||||
FLAGS "R"
|
||||
PROMPT 1 12 "Progr.Mov.Eliminati: Dare "
|
||||
PICTURE "."
|
||||
END
|
||||
|
||||
NUMBER 119 15
|
||||
NUMBER 119 19
|
||||
BEGIN
|
||||
PROMPT 47 12 "Avere "
|
||||
HELP "Progressivi avere attuali dei movimenti eliminati"
|
||||
FLAGS "R"
|
||||
PROMPT 51 12 "Avere "
|
||||
PICTURE "."
|
||||
END
|
||||
|
||||
|
@ -646,7 +646,7 @@ bool TBill::find()
|
||||
}
|
||||
_sospeso = clifo.get_bool("SOSPESO");
|
||||
|
||||
const char tipoa = clifo.get_char("TIPOAPER");
|
||||
const char tipoa = clifo.get_char("TIPOPERS");
|
||||
if (tipoa == 'F') // Se persona fisica allora aggiusta la ragione sociale
|
||||
{
|
||||
TString nome(descrizione().mid(30));
|
||||
|
@ -1339,7 +1339,9 @@ void TPagamento::adjust_parameters(bool mcomm)
|
||||
|
||||
void TPagamento::adjust_perc(int rdiff, bool v)
|
||||
{
|
||||
real other = importo_da_dividere(v);
|
||||
const real other = importo_da_dividere(v);
|
||||
if (other.is_zero())
|
||||
return;
|
||||
|
||||
const int first = _tpr > 3 ? 1 : 0;
|
||||
|
||||
@ -1349,7 +1351,7 @@ void TPagamento::adjust_perc(int rdiff, bool v)
|
||||
// togli pezzo di troppo
|
||||
if (j == first && _tpr > 0 && _tpr < 4)
|
||||
rvl -= importo_da_non_dividere(v);
|
||||
real zpx = (rvl * 100.0)/other; // percentuale
|
||||
real zpx = (rvl * 100.0) / other; // percentuale
|
||||
zpx.round(2);
|
||||
set_percrata(j, zpx);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user