Corretti errori gabri
git-svn-id: svn://10.65.10.50/trunk@2566 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
db4422ed2b
commit
c02f955b18
@ -204,12 +204,14 @@ BEGIN
|
||||
WARNING "Inserire un riepilogo non inferiore al protocollo IVA (Obbigatorio se il cliete/fornitore ha codice inserimento in allegati uguale a 3)"
|
||||
END
|
||||
|
||||
/*
|
||||
STRING F_CLIFO 1
|
||||
BEGIN
|
||||
PROMPT 0 10 ""
|
||||
FIELD TIPO
|
||||
FLAGS "H"
|
||||
END
|
||||
*/
|
||||
|
||||
NUMBER F_CLIENTE 6
|
||||
BEGIN
|
||||
@ -223,7 +225,7 @@ BEGIN
|
||||
DISPLAY "Ragione Sociale@50" RAGSOC
|
||||
DISPLAY "Partita IVA@12" PAIV
|
||||
DISPLAY "Sospeso" SOSPESO
|
||||
OUTPUT F_CLIFO TIPOCF
|
||||
// OUTPUT F_CLIFO TIPOCF
|
||||
OUTPUT F_CLIENTE CODCF
|
||||
OUTPUT F_RAGSOCCLIENTE RAGSOC
|
||||
OUTPUT F_STATOPAIV STATOPAIV
|
||||
@ -247,7 +249,7 @@ BEGIN
|
||||
DISPLAY "Ragione Sociale@50" RAGSOC
|
||||
DISPLAY "Partita IVA@12" PAIV
|
||||
DISPLAY "Sospeso" SOSPESO
|
||||
OUTPUT F_CLIFO TIPOCF
|
||||
// OUTPUT F_CLIFO TIPOCF
|
||||
OUTPUT F_FORNITORE CODCF
|
||||
OUTPUT F_RAGSOCFORNITORE RAGSOC
|
||||
OUTPUT F_STATOPAIV STATOPAIV
|
||||
|
@ -1,26 +1,20 @@
|
||||
#include "cg2100p.h"
|
||||
|
||||
PAGE "Nuova partita" -1 -1 48 10
|
||||
PAGE "Nuova partita" -1 -1 38 7
|
||||
|
||||
RADIOBUTTON P_NUOVO 1 21
|
||||
BEGIN
|
||||
PROMPT 0 0 "@BTipo movimento"
|
||||
ITEM "1|Fattura"
|
||||
MESSAGE ENABLE,P_CODPAG
|
||||
ITEM "2|Nota credito"
|
||||
MESSAGE DISABLE,P_CODPAG
|
||||
ITEM "3|Incasso/pagamento "
|
||||
MESSAGE DISABLE,P_CODPAG
|
||||
ITEM "5|Insoluto"
|
||||
MESSAGE DISABLE,P_CODPAG
|
||||
ITEM "6|Pagamento insoluto"
|
||||
MESSAGE DISABLE,P_CODPAG
|
||||
GROUP 1
|
||||
END
|
||||
|
||||
NUMBER P_ANNO 4
|
||||
BEGIN
|
||||
PROMPT 22 1 "Partita "
|
||||
PROMPT 22 1 "Anno "
|
||||
FLAGS "A"
|
||||
CHECKTYPE REQUIRED
|
||||
WARNING "Inserire l'anno di riferimento partita"
|
||||
@ -28,80 +22,20 @@ END
|
||||
|
||||
STRING P_NUMERO 7
|
||||
BEGIN
|
||||
PROMPT 40 1 ""
|
||||
PROMPT 22 2 "Numero "
|
||||
FLAGS "U"
|
||||
CHECKTYPE REQUIRED
|
||||
WARNING "Inserire il numero di riferimento partita"
|
||||
END
|
||||
|
||||
TEXT DLG_NULL
|
||||
BUTTON DLG_CANCEL 10 2
|
||||
BEGIN
|
||||
PROMPT 22 2 "Sezione"
|
||||
END
|
||||
|
||||
RADIOBUTTON P_SEZIONE 1 19
|
||||
BEGIN
|
||||
PROMPT 31 1 ""
|
||||
ITEM "D|Dare"
|
||||
ITEM "A|Avere"
|
||||
FLAGS "Z"
|
||||
GROUP 1
|
||||
END
|
||||
|
||||
NUMBER P_RESIDUO 15
|
||||
BEGIN
|
||||
PROMPT 22 3 "Importo "
|
||||
PICTURE "."
|
||||
GROUP 1
|
||||
END
|
||||
|
||||
STRING P_CODPAG 4
|
||||
BEGIN
|
||||
PROMPT 22 4 "Pagamento "
|
||||
FLAGS "UZ"
|
||||
USE %CPG
|
||||
INPUT CODTAB P_CODPAG
|
||||
DISPLAY "Codice" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT P_CODPAG CODTAB
|
||||
CHECKTYPE REQUIRED
|
||||
ADD RUN ba3 -6
|
||||
GROUP 1
|
||||
WARNING "Codice pagamento assente"
|
||||
END
|
||||
|
||||
STRING P_NUMDOC 7
|
||||
BEGIN
|
||||
PROMPT 22 5 "Documento "
|
||||
FLAGS "U"
|
||||
GROUP 1
|
||||
END
|
||||
|
||||
DATE P_DATADOC
|
||||
BEGIN
|
||||
PROMPT 22 6 "Data "
|
||||
FLAGS "A"
|
||||
CHECKTYPE REQUIRED
|
||||
WARNING "Inserire una data per il movimento extra-contabile"
|
||||
GROUP 1
|
||||
END
|
||||
|
||||
STRING P_DESCR 50 34
|
||||
BEGIN
|
||||
PROMPT 1 7 "Descrizione "
|
||||
WARNING "Inserire una descrizione per il movimento extra-contabile"
|
||||
CHECKTYPE REQUIRED
|
||||
GROUP 1
|
||||
PROMPT 24 3 ""
|
||||
END
|
||||
|
||||
BUTTON DLG_OK 10 2
|
||||
BEGIN
|
||||
PROMPT -12 -1 ""
|
||||
END
|
||||
|
||||
BUTTON DLG_CANCEL 10 2
|
||||
BEGIN
|
||||
PROMPT -22 -1 ""
|
||||
PROMPT 24 5 ""
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
@ -111,6 +111,7 @@ BEGIN
|
||||
ITEM "Data op.@10"
|
||||
ITEM "Num. doc."
|
||||
ITEM "Prot. IVA"
|
||||
ITEM "Tipo"
|
||||
ITEM "Pagamento"
|
||||
ITEM "Bloccata"
|
||||
FLAGS "D"
|
||||
@ -189,7 +190,7 @@ ENDPAGE
|
||||
ENDMASK
|
||||
|
||||
|
||||
PAGE "Sheet Scadenze" -1 -1 68 10
|
||||
PAGE "Sheet Scadenze" -1 -1 68 11
|
||||
|
||||
NUMBER 101 4
|
||||
BEGIN
|
||||
@ -201,7 +202,7 @@ BEGIN
|
||||
PROMPT 41 1 "Numero rata "
|
||||
END
|
||||
|
||||
NUMBER 112 4
|
||||
NUMBER 113 4
|
||||
BEGIN
|
||||
PROMPT 1 2 "Riga pagamento "
|
||||
END
|
||||
@ -213,12 +214,12 @@ END
|
||||
|
||||
NUMBER 108 5
|
||||
BEGIN
|
||||
PROMPT 1 3 "Numero op. "
|
||||
PROMPT 1 3 "Numero operaz. "
|
||||
END
|
||||
|
||||
DATE 109
|
||||
BEGIN
|
||||
PROMPT 41 3 "Data op. "
|
||||
PROMPT 41 3 "Data operaz. "
|
||||
END
|
||||
|
||||
STRING 110 7
|
||||
@ -226,9 +227,14 @@ BEGIN
|
||||
PROMPT 1 4 "Numero doc. "
|
||||
END
|
||||
|
||||
BOOLEAN 113
|
||||
LIST 112 1 20
|
||||
BEGIN
|
||||
PROMPT 1 5 "Pagamenti bloccati"
|
||||
PROMPT 1 5 "Tipo movimento "
|
||||
ITEM "1|Fattura"
|
||||
ITEM "2|Nota credito"
|
||||
ITEM "3|Incasso/Pagamento"
|
||||
ITEM "5|Insoluto"
|
||||
ITEM "6|Pagamento insoluto"
|
||||
END
|
||||
|
||||
NUMBER 111 5
|
||||
@ -258,6 +264,11 @@ BEGIN
|
||||
FLAGS "R"
|
||||
END
|
||||
|
||||
BOOLEAN 114
|
||||
BEGIN
|
||||
PROMPT 1 8 "Pagamenti bloccati"
|
||||
END
|
||||
|
||||
BUTTON DLG_CANCEL 12 2
|
||||
BEGIN
|
||||
PROMPT -12 -1 ""
|
||||
@ -265,7 +276,7 @@ END
|
||||
|
||||
BUTTON 100 12 2
|
||||
BEGIN
|
||||
PROMPT -22 -1 "~Pagamento"
|
||||
PROMPT -22 -1 "~Gestione"
|
||||
END
|
||||
|
||||
|
||||
|
102
cg/cg2102.cpp
102
cg/cg2102.cpp
@ -216,14 +216,6 @@ void TPrimanota_application::set_cgs_imp(int n, const TImporto& imp)
|
||||
TSheet_field& s = cgs();
|
||||
imp.add_to(s.row(n), 0);
|
||||
s.force_update(n);
|
||||
/*
|
||||
TMask& m = s.sheet_mask();
|
||||
if (m.is_running() && s.selected() == n)
|
||||
{
|
||||
m.set(101, imp.sezione() == 'D' ? imp.valore().string() : "");
|
||||
m.set(102, imp.sezione() == 'A' ? imp.valore().string() : "");
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
// Legge l'importo della riga n e lo ritorna col segno dovuto
|
||||
@ -561,6 +553,7 @@ bool TPrimanota_application::cg_handler(TMask_field& f, KEY k)
|
||||
TMask& m = f.mask();
|
||||
const bool paga = a.is_pagamento();
|
||||
const bool nota = a.is_nota_credito() && m.field(F_NUMRIF).active();
|
||||
const bool fatt = a.is_fattura() && m.page_enabled(2);
|
||||
|
||||
const long numreg = m.get_long(F_NUMREG);
|
||||
|
||||
@ -590,7 +583,7 @@ bool TPrimanota_application::cg_handler(TMask_field& f, KEY k)
|
||||
if (tipo == 'K' || tipo == 'T')
|
||||
{
|
||||
const int currig = i+1;
|
||||
const TImporto speso = app().partite().importo_speso(numreg, currig);
|
||||
const TImporto speso = a.partite().importo_speso(numreg, currig);
|
||||
if (importo != speso)
|
||||
{
|
||||
TString msg(128);
|
||||
@ -619,17 +612,19 @@ bool TPrimanota_application::cg_handler(TMask_field& f, KEY k)
|
||||
}
|
||||
}
|
||||
|
||||
if (empty)
|
||||
return f.error_box("Il movimento non ha nessuna riga contabile con un importo");
|
||||
|
||||
|
||||
if (paga)
|
||||
{
|
||||
const char s(a.causale().sezione(2));
|
||||
const real t(m.get(F_TOTALE));
|
||||
const TImporto totdoc(s, t);
|
||||
const char sez(a.causale().sezione(2));
|
||||
const TImporto totdoc(sez, m.get_real(F_TOTALE));
|
||||
bool ok = imptot_error(totdoc, saldaconto, FALSE);
|
||||
|
||||
if (ok && in_valuta && !saldaconto.is_zero())
|
||||
{
|
||||
const real t(m.get(SK_TOTDOCVAL));
|
||||
const TImporto totdoc_val(s, t);
|
||||
const TImporto totdoc_val(sez, m.get_real(SK_TOTDOCVAL));
|
||||
ok = imptot_error(totdoc_val, saldaconto_val, TRUE);
|
||||
}
|
||||
|
||||
@ -637,7 +632,7 @@ bool TPrimanota_application::cg_handler(TMask_field& f, KEY k)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (a.is_fattura())
|
||||
if (fatt || nota)
|
||||
{
|
||||
TBill contocf;
|
||||
if (a.cerca_conto_cf(contocf) < 0)
|
||||
@ -647,18 +642,22 @@ bool TPrimanota_application::cg_handler(TMask_field& f, KEY k)
|
||||
msg << contocf.codclifo() << ":\n";
|
||||
if (m.edit_mode())
|
||||
{
|
||||
if (m.page_enabled(2))
|
||||
{
|
||||
msg << "Si desidera eliminare il saldaconto?";
|
||||
const bool kill = f.yesno_box(msg);
|
||||
if (kill)
|
||||
{
|
||||
msg << "Si desidera eliminare il saldaconto?";
|
||||
const bool kill = f.yesno_box(msg);
|
||||
if (kill)
|
||||
{
|
||||
if (fatt) // Se e' una fattura elimina il numero partita
|
||||
{
|
||||
m.reset(F_ANNORIF);
|
||||
m.reset(F_NUMRIF);
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
{ // Se e' una nota credito elimina il saldaconto
|
||||
a.notify_cgline_deletion(-1);
|
||||
}
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -667,9 +666,6 @@ bool TPrimanota_application::cg_handler(TMask_field& f, KEY k)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (empty)
|
||||
return f.error_box("Il movimento non ha nessuna riga contabile con un importo");
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
@ -865,9 +861,9 @@ bool TPrimanota_application::cg_notify(TSheet_field& cg, int r, KEY k)
|
||||
if (tipo == 'K' || tipo == 'G')
|
||||
{
|
||||
const int k = tipo == 'K' ? 1 : 10;
|
||||
TBill conto; app().causale().bill(k, conto);
|
||||
const TString80 desc(app().causale().desc_agg(k));
|
||||
const char sez = app().causale().sezione(k);
|
||||
TBill conto; a.causale().bill(k, conto);
|
||||
const TString80 desc(a.causale().desc_agg(k));
|
||||
const char sez = a.causale().sezione(k);
|
||||
const real imp(cg.mask().get(K_RESIDUO));
|
||||
TImporto importo(sez, imp);
|
||||
a.set_cgs_row(r, importo, conto, desc, tipo);
|
||||
@ -897,6 +893,7 @@ bool TPrimanota_application::cg_notify(TSheet_field& cg, int r, KEY k)
|
||||
a.sub_cgs_imp(s, importo);
|
||||
}
|
||||
}
|
||||
a.calcola_saldo();
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -933,24 +930,46 @@ bool TPrimanota_application::descr_handler(TMask_field& f, KEY k)
|
||||
// Handler per le colonne 'Dare' e 'Avere' dello sheet contabile.
|
||||
// Scrivendo qualcosa in dare (101) cancella l'importo in avere (102) e viceversa
|
||||
bool TPrimanota_application::dareavere_handler(TMask_field& f, KEY k)
|
||||
{
|
||||
if (k == K_F8 && app().is_pagamento())
|
||||
{
|
||||
TPrimanota_application& a = app();
|
||||
TSheet_field& cgs = a.cgs();
|
||||
const int currig = cgs.selected();
|
||||
|
||||
if (k == K_F8 && a.is_pagamento())
|
||||
{
|
||||
const long numreg = app().curr_mask().get_long(F_NUMREG);
|
||||
const int numrig = app().cgs().selected()+1;
|
||||
const TImporto speso = app().partite().importo_speso(numreg, numrig);
|
||||
const long numreg = a.curr_mask().get_long(F_NUMREG);
|
||||
const TImporto speso = a.partite().importo_speso(numreg, currig+1);
|
||||
|
||||
const char* ss = speso.valore().string();
|
||||
TMask& m = f.mask();
|
||||
m.set(CG_DARE, speso.sezione() == 'D' ? ss : "");
|
||||
m.set(CG_AVERE, speso.sezione() == 'A' ? ss : "");
|
||||
app().calcola_saldo();
|
||||
|
||||
if (!m.is_running())
|
||||
{
|
||||
speso.add_to(cgs.row(currig), 0); // Aggiorna riga sheet
|
||||
a.calcola_saldo(); // Aggiorna saldo e residuo
|
||||
}
|
||||
}
|
||||
|
||||
if (k == K_TAB && f.focusdirty() && f.get().not_empty())
|
||||
{
|
||||
const int id = 203-f.dlg(); // Calcola id del campo da resettare
|
||||
f.mask().reset(id);
|
||||
if (k == K_TAB && f.focusdirty())
|
||||
{
|
||||
const TString& val = f.get();
|
||||
TToken_string& row = cgs.row(currig);
|
||||
row.add(val, f.dlg() - CG_DARE); // Aggiorno stringa sheet
|
||||
|
||||
if (val.not_empty())
|
||||
{
|
||||
// Calcola id del campo da resettare
|
||||
const int id = f.dlg() == CG_DARE ? CG_AVERE : CG_DARE;
|
||||
f.mask().reset(id); // Aggiorna maschera e ...
|
||||
row.add("", id - CG_DARE); // ... riga dello sheet
|
||||
}
|
||||
|
||||
if (!f.mask().is_running())
|
||||
a.calcola_saldo(); // Aggiorna saldo e residuo
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -2000,8 +2019,10 @@ bool TPrimanota_application::clifo_handler(TMask_field& f, KEY key)
|
||||
m.show(cf == 'C' ? F_COFICLIENTE : F_COFIFORNITORE, !occas); // Codice Fiscale
|
||||
|
||||
if (occas && a.is_fattura() && a.partite().first() != NULL)
|
||||
{
|
||||
f.warning_box("Attenzione, il saldaconto verra' eliminato!");
|
||||
|
||||
f.set_dirty(); // warning_box cleans the field!
|
||||
}
|
||||
a.activate_numrif(TRUE);
|
||||
|
||||
if (f.focusdirty())
|
||||
@ -2010,6 +2031,7 @@ bool TPrimanota_application::clifo_handler(TMask_field& f, KEY key)
|
||||
if (occas && a.occas_mask().get(O_CODICE).blank())
|
||||
m.send_key(K_SPACE, F_OCCASEDIT); // Lancia maschera occasionali
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
@ -231,7 +231,7 @@ bool TPrimanota_application::pag_sheet_handler(TMask_field& f, KEY key)
|
||||
{
|
||||
TString s(256);
|
||||
pag.strerr(err, s);
|
||||
ok = error_box(s);
|
||||
return f.error_box(s);
|
||||
}
|
||||
|
||||
const bool in_valuta = m.get(SK_VALUTA).not_empty();
|
||||
|
@ -2,7 +2,9 @@
|
||||
|
||||
#include "cg2100p.h" // Campi maschere partite e pagamenti
|
||||
|
||||
#ifndef __EXTRA__
|
||||
#ifdef __EXTRA__
|
||||
#include "saldacon.h"
|
||||
#else
|
||||
#include "cg2100.h" // Campi maschere prima nota
|
||||
#include "cg2102.h" // Applicazione di prima nota
|
||||
#endif
|
||||
@ -138,10 +140,23 @@ void TPay_mask::set_pag(const TRectype& oldpag, const TRiga_scadenze& scad,
|
||||
|
||||
TMask_field& group = field(S_RATA);
|
||||
TString prompt(80);
|
||||
|
||||
const TBill& k = p.conto();
|
||||
switch (k.tipo())
|
||||
{
|
||||
case 'C': prompt << "Cliente"; break;
|
||||
case 'F': prompt << "Fornitore"; break;
|
||||
default : prompt << "Conto"; break;
|
||||
}
|
||||
prompt << ' ' << k.gruppo() << ' ' << k.conto() << ' ' << k.sottoconto() << ' ';
|
||||
prompt << "Partita:" << p.anno() << ' ' << p.numero()
|
||||
<< " Riga:" << fatt.get_int(PART_NRIGA)
|
||||
<< " Rata:" << scad.get_int(SCAD_NRATA)
|
||||
<< " del " << scad.get_date(SCAD_DATASCAD).string();
|
||||
<< " Riga:" << oldpag.get_int(PAGSCA_NRIGA)
|
||||
<< " Rata:" << oldpag.get_int(PAGSCA_NRATA)
|
||||
<< " del ";
|
||||
if (oldpag.get_int(PAGSCA_NRIGA) == TPartita::UNASSIGNED)
|
||||
prompt << sum.get_date(PART_DATAPAG).string();
|
||||
else
|
||||
prompt << scad.get_date(SCAD_DATASCAD).string();
|
||||
group.set(prompt);
|
||||
|
||||
set(S_NUMDOC, fatt.get(PART_NUMDOC)); // Numero documento
|
||||
@ -160,7 +175,8 @@ void TPay_mask::set_pag(const TRectype& oldpag, const TRiga_scadenze& scad,
|
||||
set(S_TIPOPAG, sum.get(PART_TIPOPAG)); // Tipo pagamento
|
||||
set(S_DESCAGG, sum.get(PART_DESCR)); // Descrizione documento
|
||||
|
||||
set(S_SEZIONE_SCAD, scad.riga().sezione()); // Sezione della rata
|
||||
set(S_SEZIONE_SCAD, fatt.sezione()); // Sezione della riga
|
||||
|
||||
set(S_IMPORTO_SCAD, scad.get(SCAD_IMPORTO)); // Importo della rata
|
||||
set(S_IMPORTOVAL_SCAD, scad.get(SCAD_IMPORTOVAL)); // Importo in valuta
|
||||
|
||||
@ -537,6 +553,7 @@ bool TGame_mask::cambio_handler(TMask_field& f, KEY k)
|
||||
const TValuta val(gm, P_VALUTA, P_DATACAMBIO, P_CAMBIO);
|
||||
gm.aggiorna_valuta(val);
|
||||
}
|
||||
gm.aggiorna_residuo();
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
@ -703,6 +720,7 @@ bool TGame_mask::partite_notify(TSheet_field& partite, int r, KEY k)
|
||||
riga_fattura.add(riga.get(PART_DATAREG));
|
||||
riga_fattura.add(riga.get(PART_NUMDOC));
|
||||
riga_fattura.add(riga.get(PART_PROTIVA));
|
||||
riga_fattura.add(riga.get(PART_TIPOMOV));
|
||||
scadenze.add(riga_fattura);
|
||||
|
||||
for (int ra = 1; ra <= riga.rate(); ra++)
|
||||
@ -721,7 +739,7 @@ bool TGame_mask::partite_notify(TSheet_field& partite, int r, KEY k)
|
||||
row.add(descr, 4);
|
||||
|
||||
const bool blocked = scad.get_bool(SCAD_BLOCCATA);
|
||||
row.add(blocked ? "X" : " " , 12);
|
||||
row.add(blocked ? "X" : " " , 13);
|
||||
|
||||
const int lastp = scad.last();
|
||||
for (int pa = scad.first(); pa <= lastp; pa = scad.succ(pa))
|
||||
@ -751,6 +769,7 @@ bool TGame_mask::partite_notify(TSheet_field& partite, int r, KEY k)
|
||||
row.add(sum.get(PART_DATAREG));
|
||||
row.add(sum.get(PART_NUMDOC));
|
||||
row.add("");
|
||||
row.add(sum.get(PART_TIPOMOV));
|
||||
row.add(pa);
|
||||
}
|
||||
|
||||
@ -845,6 +864,7 @@ bool TGame_mask::partite_notify(TSheet_field& partite, int r, KEY k)
|
||||
row.add(sum.get(PART_DATAREG));
|
||||
row.add(sum.get(PART_NUMDOC));
|
||||
row.add("");
|
||||
row.add(sum.get(PART_TIPOMOV));
|
||||
row.add(pa);
|
||||
}
|
||||
|
||||
@ -1069,11 +1089,11 @@ bool TGame_mask::edit_scadenza_handler(TMask_field& f, KEY k)
|
||||
|
||||
long nreg = m.get_long(108); // Numero registrazione
|
||||
const int nrata = m.get_int(102); // Rata selezionata (puo' essere 0)
|
||||
int nrigp = m.get_int(112); // Pagamento selezionato (puo' essere 0)
|
||||
int nrigp = m.get_int(113); // Pagamento selezionato (puo' essere 0)
|
||||
|
||||
if (nrata != 0 && nrigp == 0)
|
||||
{
|
||||
if (m.get_bool(113))
|
||||
if (m.get_bool(114))
|
||||
return f.error_box("La rata %d e' bloccata.", nrata);
|
||||
|
||||
const TValuta parval(game.riga(nriga));
|
||||
@ -1144,14 +1164,17 @@ bool TGame_mask::edit_scadenza_handler(TMask_field& f, KEY k)
|
||||
const char* cur_num = cur_game.get();
|
||||
const bool on_sheet = game.anno() == cur_year && game.numero() == cur_num;
|
||||
|
||||
TSheet_field& ss = gm.scadenze();
|
||||
const int rs = ss.selected(); // Memorizza la riga corrente
|
||||
|
||||
if (game.ok())
|
||||
{
|
||||
if (on_sheet)
|
||||
{
|
||||
gm.update_partita(game, gm._riga_partite);
|
||||
const int r = gm._riga_partite;
|
||||
const int rp = gm._riga_partite;
|
||||
gm._riga_partite = -1; // Forza aggiornamento sheet
|
||||
partite_notify(gm.partite(), r, K_TAB);
|
||||
partite_notify(gm.partite(), rp, K_TAB);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -1163,6 +1186,8 @@ bool TGame_mask::edit_scadenza_handler(TMask_field& f, KEY k)
|
||||
if (on_sheet)
|
||||
gm.fill_partite();
|
||||
}
|
||||
if (rs < ss.items())
|
||||
ss.select(rs); // Riporta la selezione sulla riga corrente
|
||||
|
||||
gm._changed = TRUE;
|
||||
}
|
||||
@ -1192,16 +1217,9 @@ bool TGame_mask::nuovo_handler(TMask_field& f, KEY k)
|
||||
|
||||
#ifndef __EXTRA__
|
||||
const TMask& cm = app().curr_mask();
|
||||
new_game->disable(-1);
|
||||
new_game->disable(P_NUOVO);
|
||||
gm._tipomov = (tipo_movimento)app().causale().tipomov();
|
||||
new_game->set(P_NUOVO, gm._tipomov);
|
||||
new_game->set(P_SEZIONE, gm._residuo.sezione());
|
||||
new_game->set(P_RESIDUO, gm._residuo.valore());
|
||||
new_game->set(P_DATADOC, cm.get(F_DATADOC));
|
||||
new_game->set(P_NUMDOC, cm.get(F_NUMDOC));
|
||||
new_game->set(P_DESCR, cm.get(F_DESCR));
|
||||
if (gm._tipomov < 3)
|
||||
new_game->set(P_CODPAG,cm.get(F_CODPAG));
|
||||
if (gm._tipomov == 2)
|
||||
{
|
||||
new_game->set(P_ANNO, cm.get(F_ANNORIF));
|
||||
@ -1214,11 +1232,6 @@ bool TGame_mask::nuovo_handler(TMask_field& f, KEY k)
|
||||
numero = new_game->get(P_NUMERO);
|
||||
|
||||
gm._tipomov = (tipo_movimento)new_game->get_int(P_NUOVO);
|
||||
gm._codpag = new_game->get(P_CODPAG);
|
||||
gm._sezione = new_game->get(P_SEZIONE)[0];
|
||||
gm._numdoc = new_game->get(P_NUMDOC);
|
||||
gm._datadoc = new_game->get(P_DATADOC);
|
||||
gm._descr = new_game->get(P_DESCR);
|
||||
|
||||
delete new_game; new_game = NULL;
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
#define FS_RATESHEET 501
|
||||
// #define FS_TOTAL 502
|
||||
#define FS_RDIFFER 503
|
||||
#define FS_IMPONIBILI 504
|
||||
#define FS_IMPOSTE 505
|
||||
@ -22,4 +21,3 @@
|
||||
#define FS_VALUTA 521
|
||||
#define FS_DATACAMBIO 522
|
||||
#define FS_CAMBIO 523
|
||||
#define FS_TOTVAL 524
|
||||
|
@ -20,15 +20,6 @@ BEGIN
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
NUMBER FS_TOTVAL 15 2
|
||||
BEGIN
|
||||
PROMPT 31 1 "In valuta "
|
||||
PICTURE ".3"
|
||||
FLAGS "HU"
|
||||
VALIDATE REQIF_FUNC 1 FS_VALUTA
|
||||
WARNING "Manca il totale documento in valuta"
|
||||
END
|
||||
|
||||
NUMBER FS_SPESE 15
|
||||
BEGIN
|
||||
PROMPT 58 1 "Spese "
|
||||
|
Loading…
x
Reference in New Issue
Block a user