Gabriellismi
git-svn-id: svn://10.65.10.50/trunk@2323 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
68f9bdbfcf
commit
9b59375403
@ -14,6 +14,7 @@
|
|||||||
#include <partite.h>
|
#include <partite.h>
|
||||||
#include <scadenze.h>
|
#include <scadenze.h>
|
||||||
#include <pagsca.h>
|
#include <pagsca.h>
|
||||||
|
#include <defmask.h>
|
||||||
|
|
||||||
TPagamento& TPrimanota_application::pagamento() const
|
TPagamento& TPrimanota_application::pagamento() const
|
||||||
{
|
{
|
||||||
@ -301,6 +302,7 @@ bool TPrimanota_application::recalc_handler(TMask_field& f, KEY key)
|
|||||||
const TMask& m = f.mask();
|
const TMask& m = f.mask();
|
||||||
TSheet_field& ps = (TSheet_field&)m.field(FS_RATESHEET);
|
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();
|
TPagamento& pag = app().pagamento();
|
||||||
if (pag.tipo_prima_rata() >= 4)
|
if (pag.tipo_prima_rata() >= 4)
|
||||||
{
|
{
|
||||||
|
@ -139,14 +139,21 @@ BEGIN
|
|||||||
CHECKTYPE NORMAL
|
CHECKTYPE NORMAL
|
||||||
END
|
END
|
||||||
|
|
||||||
|
BUTTON DLG_DELREC 10 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT -13 -1 ""
|
||||||
|
FLAGS "D"
|
||||||
|
MESSAGE EXIT,K_DEL
|
||||||
|
END
|
||||||
|
|
||||||
BUTTON DLG_CANCEL 10 2
|
BUTTON DLG_CANCEL 10 2
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT -12 -1 ""
|
PROMPT -23 -1 ""
|
||||||
END
|
END
|
||||||
|
|
||||||
BUTTON DLG_OK 10 2
|
BUTTON DLG_OK 10 2
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT -22 -1 ""
|
PROMPT -33 -1 ""
|
||||||
END
|
END
|
||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
|
@ -214,14 +214,14 @@ void TPagamento::set_numero_rate(int n, int sscad, int rdiff)
|
|||||||
// e' selezionato UGUALI: devo: lasciare la prima
|
// e' selezionato UGUALI: devo: lasciare la prima
|
||||||
// rata com'e' (a meno che non ce ne sia una sola) e
|
// rata com'e' (a meno che non ce ne sia una sola) e
|
||||||
// suddividere il resto dell'importo tra le altre
|
// 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;
|
if (_inited && _tpr > 0 && _tpr < 4) rfirst -= _secndr;
|
||||||
|
|
||||||
real rest = tot - rfirst;
|
real rest = tot - _tpr >= 4 ? ZERO : rfirst;
|
||||||
const real div = rest / real(nact - 1);
|
const real div = rest / real(nact);
|
||||||
real perc = real(100.0)*(div/tot);
|
real perc = real(100.0)*(div/tot);
|
||||||
|
|
||||||
for (i = first+1; i < n; i++)
|
for (i = 1; i < n; i++)
|
||||||
{
|
{
|
||||||
if (i >= nr)
|
if (i >= nr)
|
||||||
add_rata(perc, (sscad == -1 ? (i < nr ? scad_rata(i) : scad_rata(nr-1)) : sscad),
|
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
|
// HERE
|
||||||
real tot = is_perc_modified ? real(100.0) : (_tpr < 4 ? _firstr : _secndr);
|
real tot = is_perc_modified ? real(100.0) : (_tpr < 4 ? _firstr : _secndr);
|
||||||
real delta = is_perc_modified ? ZERO :
|
real delta = is_perc_modified ? ZERO :
|
||||||
((_tpr > 0 && _tpr) < 4 ? _secndr : ZERO);
|
((_tpr > 0 && _tpr < 4) ? _secndr : ZERO);
|
||||||
real nimp(new_value);
|
real nimp(new_value);
|
||||||
|
|
||||||
// se ho modificato la prima, divido il resto nelle successive
|
// 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));
|
nscd = atoi(trt.get(0));
|
||||||
if (type == 0) type = 1;
|
if (type == 0) type = 1;
|
||||||
if (j > 0 && nscd == 0) nscd = oldscad;
|
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);
|
next_scad(dd,nscd,mcomm,j);
|
||||||
}
|
}
|
||||||
else if (_inited)
|
else if (_inited)
|
||||||
@ -1058,8 +1058,6 @@ word TPagamento::recalc_rate(int row, bool is_perc_modified,
|
|||||||
TToken_string& tr = rata(j);
|
TToken_string& tr = rata(j);
|
||||||
|
|
||||||
real rvl = dt.get();
|
real rvl = dt.get();
|
||||||
if (!is_perc_modified)
|
|
||||||
rvl *= real(100.0);
|
|
||||||
|
|
||||||
if (j == first)
|
if (j == first)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user