Gabriellismi

git-svn-id: svn://10.65.10.50/trunk@2323 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
villa 1995-12-20 10:16:55 +00:00
parent 68f9bdbfcf
commit 9b59375403
3 changed files with 18 additions and 11 deletions

View File

@ -14,6 +14,7 @@
#include <partite.h>
#include <scadenze.h>
#include <pagsca.h>
#include <defmask.h>
TPagamento& TPrimanota_application::pagamento() const
{
@ -300,7 +301,8 @@ bool TPrimanota_application::recalc_handler(TMask_field& f, KEY key)
const bool on = f.get().not_empty();
const TMask& m = f.mask();
TSheet_field& ps = (TSheet_field&)m.field(FS_RATESHEET);
ps.enable_column(3, on);
ps.enable_column(3, on);
ps.sheet_mask().enable(DLG_DELREC, !on);
TPagamento& pag = app().pagamento();
if (pag.tipo_prima_rata() >= 4)
{

View File

@ -138,15 +138,22 @@ BEGIN
COPY OUTPUT 110
CHECKTYPE NORMAL
END
BUTTON DLG_DELREC 10 2
BEGIN
PROMPT -13 -1 ""
FLAGS "D"
MESSAGE EXIT,K_DEL
END
BUTTON DLG_CANCEL 10 2
BEGIN
PROMPT -12 -1 ""
PROMPT -23 -1 ""
END
BUTTON DLG_OK 10 2
BEGIN
PROMPT -22 -1 ""
PROMPT -33 -1 ""
END
ENDPAGE

View File

@ -214,14 +214,14 @@ void TPagamento::set_numero_rate(int n, int sscad, int rdiff)
// e' selezionato UGUALI: devo: lasciare la prima
// rata com'e' (a meno che non ce ne sia una sola) e
// suddividere il resto dell'importo tra le altre
real rfirst = _inited ? tpay_rata(first) : perc_rata(first);
real rfirst = _inited ? tpay_rata(0) : perc_rata(0);
if (_inited && _tpr > 0 && _tpr < 4) rfirst -= _secndr;
real rest = tot - rfirst;
const real div = rest / real(nact - 1);
real rest = tot - _tpr >= 4 ? ZERO : rfirst;
const real div = rest / real(nact);
real perc = real(100.0)*(div/tot);
for (i = first+1; i < n; i++)
for (i = 1; i < n; i++)
{
if (i >= nr)
add_rata(perc, (sscad == -1 ? (i < nr ? scad_rata(i) : scad_rata(nr-1)) : sscad),
@ -860,7 +860,7 @@ word TPagamento::recalc_rate(int row, bool is_perc_modified,
// HERE
real tot = is_perc_modified ? real(100.0) : (_tpr < 4 ? _firstr : _secndr);
real delta = is_perc_modified ? ZERO :
((_tpr > 0 && _tpr) < 4 ? _secndr : ZERO);
((_tpr > 0 && _tpr < 4) ? _secndr : ZERO);
real nimp(new_value);
// se ho modificato la prima, divido il resto nelle successive
@ -951,7 +951,7 @@ word TPagamento::recalc_rate(int row, bool is_perc_modified,
nscd = atoi(trt.get(0));
if (type == 0) type = 1;
if (j > 0 && nscd == 0) nscd = oldscad;
if (_inited && dd == lastdate && j > 0)
if (_inited && dd == lastdate && j > frs)
next_scad(dd,nscd,mcomm,j);
}
else if (_inited)
@ -1058,8 +1058,6 @@ word TPagamento::recalc_rate(int row, bool is_perc_modified,
TToken_string& tr = rata(j);
real rvl = dt.get();
if (!is_perc_modified)
rvl *= real(100.0);
if (j == first)
{