Patch level :
Files correlati : ps0017.exe Ricompilazione Demo : [ ] Commento : Incassi Dinamica git-svn-id: svn://10.65.10.50/branches/R_10_00@21437 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
03412607e1
commit
29ec2137f6
@ -9,6 +9,8 @@
|
||||
|
||||
#include <clifo.h>
|
||||
#include <cfven.h>
|
||||
#include <partite.h>
|
||||
#include <rmov.h>
|
||||
#include <doc.h>
|
||||
#include <mov.h>
|
||||
#include "../ca/calib01.h"
|
||||
@ -48,7 +50,7 @@ public:
|
||||
void sort_sheet();
|
||||
void update_total();
|
||||
|
||||
TRectype& new_row_effetto(TDistinta& dist, char tipocf, long codcf,
|
||||
TRectype& new_row_effetto(TDistinta& dist, char tipocf, long codcf, const TString & cup, const TString & cig,
|
||||
int& rigadist, int& rigaeff) const;
|
||||
long get_free_num() const;
|
||||
void save_rate();
|
||||
@ -218,6 +220,27 @@ bool TPE_mask::fill_row(const TRiga_scadenze& rs, TToken_string& row, bool& part
|
||||
case 9:row.add(TR("Bonifico")); break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
TRiga_partite& rp = rs.riga();
|
||||
TString cup;
|
||||
TString cig;
|
||||
|
||||
const long numreg = rp.get_long(PART_NREG);
|
||||
|
||||
if (numreg > 0)
|
||||
{
|
||||
TToken_string key;
|
||||
|
||||
key.add(numreg);
|
||||
key.add(1);
|
||||
|
||||
const TRectype & rmov = cache().get(LF_RMOV, key);
|
||||
|
||||
cup = rmov.get(RMV_CUP);
|
||||
cig = rmov.get(RMV_CIG);
|
||||
}
|
||||
row.add(cup);
|
||||
row.add(cig);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
@ -332,7 +355,7 @@ bool TPE_mask::fill_rate()
|
||||
const TDate adata = get(F_A_DATA);
|
||||
const TString& codval = get(F_CODVAL);
|
||||
TSheet_field& sheet = sfield(F_SHEET);
|
||||
sheet.destroy();
|
||||
// sheet.destroy();
|
||||
|
||||
TString commessa;
|
||||
TString cdc;
|
||||
@ -449,7 +472,7 @@ bool TPE_mask::fill_distinta(bool clear_all)
|
||||
const bool dist_cont = dist.contabilizzata();
|
||||
if (dist.items() > 0)
|
||||
{
|
||||
TToken_string row;
|
||||
int rows = 0;
|
||||
for (int e = 0; e < dist.items(); e++)
|
||||
{
|
||||
const TEffetto& eff = dist[e];
|
||||
@ -468,13 +491,15 @@ bool TPE_mask::fill_distinta(bool clear_all)
|
||||
{
|
||||
TRiga_scadenze& rs = game.rata(nriga, nrata);
|
||||
bool partially_unassigned;
|
||||
if (fill_row(rs, row, partially_unassigned, dist_cont, clear_all))
|
||||
TToken_string& row = sheet.row(rows++);
|
||||
if (fill_row(rs, row, partially_unassigned, dist_cont, clear_all))
|
||||
{
|
||||
const int numrow = insert_row(row);
|
||||
row.add(eff.get(EFF_CUP), sheet.cid2index(F_CUP));
|
||||
row.add(eff.get(EFF_CIG), sheet.cid2index(F_CIG));
|
||||
if (partially_unassigned)
|
||||
sheet.disable_cell(numrow, 1); // Non e' possibile mettere saldo
|
||||
sheet.disable_cell(r - 1, 1); // Non e' possibile mettere saldo
|
||||
if (dist_cont)
|
||||
sheet.disable_cell(numrow, -1); // Non e' possibile modificare nulla
|
||||
sheet.disable_cell(r - 1, -1); // Non e' possibile modificare nulla
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -516,7 +541,7 @@ bool TPE_mask::fill_distinta(bool clear_all)
|
||||
return full;
|
||||
}
|
||||
|
||||
TRectype& TPE_mask::new_row_effetto(TDistinta& dist, char tipocf, long codcf,
|
||||
TRectype& TPE_mask::new_row_effetto(TDistinta& dist, char tipocf, long codcf, const TString & cup, const TString & cig,
|
||||
int& rigadist, int& rigaeff ) const
|
||||
{
|
||||
TString16 codice; codice << tipocf << '|' << codcf;
|
||||
@ -528,12 +553,22 @@ TRectype& TPE_mask::new_row_effetto(TDistinta& dist, char tipocf, long codcf,
|
||||
for (int i = 0; i < dist.items(); i++)
|
||||
{
|
||||
TEffetto& eff = dist[i];
|
||||
if (eff.get_char(EFF_TIPOCF) == tipocf &&
|
||||
eff.get_long(EFF_CODCF) == codcf)
|
||||
if (eff.get_char(EFF_TIPOCF) == tipocf && eff.get_long(EFF_CODCF) == codcf)
|
||||
{
|
||||
neweff = &eff;
|
||||
rigadist = i+1;
|
||||
break;
|
||||
bool found = true;
|
||||
|
||||
if (main_app().has_module(CUAUT))
|
||||
{
|
||||
const TString & eff_cup = eff.get(EFF_CUP);
|
||||
|
||||
found = (cup == eff_cup) && (cig == eff.get(EFF_CIG));
|
||||
}
|
||||
if (found)
|
||||
{
|
||||
neweff = &eff;
|
||||
rigadist = i+1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -547,7 +582,9 @@ TRectype& TPE_mask::new_row_effetto(TDistinta& dist, char tipocf, long codcf,
|
||||
neweff->put(EFF_CODVAL, get(F_CODVAL));
|
||||
neweff->put(EFF_CAMBIO, get(F_CAMBIO));
|
||||
neweff->put(EFF_DATACAMBIO, get(F_DATACAMBIO));
|
||||
}
|
||||
neweff->put(EFF_CUP, cup);
|
||||
neweff->put(EFF_CIG, cig);
|
||||
}
|
||||
rigaeff = neweff->rows_r()+1;
|
||||
return neweff->row_r(rigaeff, TRUE);
|
||||
}
|
||||
@ -596,13 +633,15 @@ void TPE_mask::save_rate()
|
||||
char accsal = row->get_char(sheet.cid2index(F_ACCSAL));
|
||||
int rigadist = row->get_int(sheet.cid2index(F_RIGADIST));
|
||||
int rigaeff = row->get_int(sheet.cid2index(F_RIGAEFF));
|
||||
const TString cup = row->get(sheet.cid2index(F_CUP));
|
||||
const TString cig = row->get(sheet.cid2index(F_CIG));
|
||||
if (rigaeff > 0 || accsal == 'S' || imp > ZERO)
|
||||
{
|
||||
if (rigaeff <= 0)
|
||||
{
|
||||
long codcf = row->get_long(sheet.cid2index(F_CODCF));
|
||||
|
||||
TRectype& reff = new_row_effetto(distinta, 'C', codcf, rigadist, rigaeff);
|
||||
TRectype& reff = new_row_effetto(distinta, 'C', codcf, cup, cig, rigadist, rigaeff);
|
||||
reff.put(REFF_ANNO, row->get(sheet.cid2index(F_ANNO)));
|
||||
reff.put(REFF_NUMPART, row->get(sheet.cid2index(F_PARTITA)));
|
||||
reff.put(REFF_NRIGA, row->get(sheet.cid2index(F_RIGA)));
|
||||
@ -655,6 +694,8 @@ void TPE_mask::save_rate()
|
||||
}
|
||||
|
||||
TEffetto& eff = distinta[rigadist-1];
|
||||
eff.put(EFF_CUP, cup);
|
||||
eff.put(EFF_CIG, cig);
|
||||
TRectype& reff = eff.row_r(rigaeff);
|
||||
real oldimp = reff.get(REFF_IMPORTO);
|
||||
real oldimpval = reff.get(REFF_IMPORTOVAL);
|
||||
|
@ -42,3 +42,7 @@
|
||||
#define F_RIGADIST 111
|
||||
#define F_RIGAEFF 112
|
||||
#define F_DESC_TIPO 113
|
||||
#define F_CUP 114
|
||||
#define F_DCUP 115
|
||||
#define F_CIG 116
|
||||
#define F_DCIG 117
|
||||
|
@ -2,27 +2,38 @@
|
||||
|
||||
TOOLBAR "" 0 0 0 2
|
||||
|
||||
BUTTON F_UNCONTABIL 2 2
|
||||
BUTTON DLG_NEWREC 10 2
|
||||
BEGIN
|
||||
PROMPT 1 1 "~Annulla cont."
|
||||
PICTURE TOOL_CONVERT
|
||||
FLAGS "H"
|
||||
PROMPT -16 -1 "~Nuovo"
|
||||
PICTURE BMP_NEWREC
|
||||
PICTURE BMP_NEWRECDN
|
||||
GROUP 3
|
||||
END
|
||||
|
||||
BUTTON DLG_SAVEREC 10 2
|
||||
BEGIN
|
||||
PROMPT -26 -1 "~Registra"
|
||||
|
||||
PICTURE BMP_SAVEREC
|
||||
PICTURE BMP_SAVERECDN
|
||||
END
|
||||
|
||||
BUTTON F_CONTABILI 2 2
|
||||
BUTTON DLG_DELREC 10 2
|
||||
BEGIN
|
||||
PROMPT 2 1 "~Contabiliz."
|
||||
PICTURE TOOL_ELABORA
|
||||
PROMPT -36 -1 "~Elimina"
|
||||
|
||||
PICTURE BMP_DELREC
|
||||
PICTURE BMP_DELRECDN
|
||||
GROUP 5
|
||||
END
|
||||
|
||||
BUTTON DLG_PRINT 2 2
|
||||
BUTTON DLG_PRINT 10 2
|
||||
BEGIN
|
||||
PROMPT 3 1 ""
|
||||
PICTURE TOOL_PRINT
|
||||
PROMPT -46 -1 ""
|
||||
PICTURE BMP_PRINT
|
||||
END
|
||||
|
||||
#include <relapbar.h>
|
||||
#include <cancelbar.h>
|
||||
|
||||
ENDPAGE
|
||||
|
||||
@ -215,9 +226,21 @@ BEGIN
|
||||
PICTURE BMP_SELECT
|
||||
END
|
||||
|
||||
BUTTON F_CONTABILI 30 1
|
||||
BEGIN
|
||||
PROMPT 2 8 "~Contabilizzazione"
|
||||
GROUP 5
|
||||
END
|
||||
|
||||
BUTTON F_UNCONTABIL 30 1
|
||||
BEGIN
|
||||
PROMPT 47 8 "~Annulla contabilizzazione"
|
||||
FLAGS "H"
|
||||
END
|
||||
|
||||
SPREADSHEET F_SHEET 0 -2
|
||||
BEGIN
|
||||
PROMPT 0 8 ""
|
||||
PROMPT 0 9 ""
|
||||
ITEM "Importo@18"
|
||||
ITEM "A/S@3"
|
||||
ITEM "Residuo@18"
|
||||
@ -231,6 +254,10 @@ BEGIN
|
||||
ITEM "Riga"
|
||||
ITEM "Effetto"
|
||||
ITEM "Tipo Pagamento@20"
|
||||
ITEM "CUP@15"
|
||||
ITEM "Descrizione CUP@50"
|
||||
ITEM "CIG@10"
|
||||
ITEM "Descrizione CIG@50"
|
||||
END
|
||||
|
||||
CURRENCY F_TOTAL 18
|
||||
@ -350,6 +377,53 @@ BEGIN
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
STRING F_CUP 22
|
||||
BEGIN
|
||||
PROMPT 1 8 "CUP "
|
||||
USE %CUP
|
||||
INPUT CODTAB F_CUP
|
||||
DISPLAY "Codice@22" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT F_CUP CODTAB
|
||||
OUTPUT F_DCUP S0
|
||||
FIELD CUP
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
STRING F_DCUP 50 30
|
||||
BEGIN
|
||||
PROMPT 40 8 ""
|
||||
USE %CUP KEY 2
|
||||
INPUT S0 F_DCUP
|
||||
DISPLAY "Descrizione@50" S0
|
||||
DISPLAY "Codice@22" CODTAB
|
||||
COPY OUTPUT F_CUP
|
||||
END
|
||||
|
||||
STRING F_CIG 10
|
||||
BEGIN
|
||||
PROMPT 1 9 "CIG "
|
||||
USE %CIG
|
||||
INPUT CODTAB F_CIG
|
||||
DISPLAY "Codice@10" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
DISPLAY "Codice gara" S1
|
||||
OUTPUT F_CIG CODTAB
|
||||
OUTPUT F_DCIG S0
|
||||
FIELD CIG
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
STRING F_DCIG 50 30
|
||||
BEGIN
|
||||
PROMPT 40 9 ""
|
||||
USE %CIG KEY 2
|
||||
INPUT S0 F_DCIG
|
||||
DISPLAY "Descrizione@50" S0
|
||||
DISPLAY "Codice@10" CODTAB
|
||||
COPY OUTPUT F_CIG
|
||||
END
|
||||
|
||||
BUTTON DLG_OK 10 2
|
||||
BEGIN
|
||||
PROMPT -13 -1 ""
|
||||
|
Loading…
x
Reference in New Issue
Block a user