Patch level :10.0
Files correlati :ca3.exe camenu.men Ricompilazione Demo : [ ] Commento :adolf program in korso (da 5.0) git-svn-id: svn://10.65.10.50/trunk@16590 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
447ebd29b5
commit
933f3353f8
@ -591,7 +591,7 @@ int TPrint_saldana_recordset::estrai_saldi(const TRecordset& saldana, const int
|
||||
|
||||
TAssoc_array& TPrint_saldana_recordset::get_row(TAssoc_array& cms, const char* chiave,
|
||||
const int indice, const TString& codcms, const TString& fase,
|
||||
const TString& cdc, const TString& descrizione)
|
||||
const TString& cdc, const TString& descrizione) const
|
||||
{
|
||||
//cerca se la commessa (e l'eventuale fase) esistono gia' nell'assocarray delle commesse
|
||||
TAssoc_array* riga_array = (TAssoc_array*)cms.objptr(chiave);
|
||||
@ -860,6 +860,11 @@ void TPrint_saldana_recordset::create_lines_to_print(const TString& query)
|
||||
//aggiunge gli importi e normalizza
|
||||
aggiorna_importo(riga_array, gruppo, indbil, saldana);
|
||||
aggiorna_importo(riga_array, conto, indbil, saldana);
|
||||
|
||||
//aggiorna totali della commessa (importi per codcms senza tener conto di fase o cdc)
|
||||
TAssoc_array& riga_tot = get_row(_totali[indice], codcms, indice, codcms, EMPTY_STRING, EMPTY_STRING,
|
||||
gruppo);
|
||||
aggiorna_importo(riga_tot, gruppo, indbil, saldana);
|
||||
}
|
||||
//stima ricavi ca3900 (_tipo=9)
|
||||
else
|
||||
@ -1047,15 +1052,31 @@ const TVariant& TPrint_saldana_recordset::get(const char* column_name) const
|
||||
else
|
||||
if (strcmp(column_name, "AVANZAMENTO") == 0)
|
||||
{
|
||||
//Calcola lo stato di avanzamento della commessa
|
||||
//Calcola lo stato di avanzamento della commessa in caso di stima x Tempo
|
||||
real avanzamento;
|
||||
if (_tipostima == 'T')
|
||||
{
|
||||
avanzamento = calcola_avanzamento_tempo();
|
||||
}
|
||||
else //se stima e' di tipo Costi...
|
||||
else //se stima e' di tipo Costi/Ricavi invece....Allah!!
|
||||
{
|
||||
TAssoc_array& riga = (TAssoc_array&)_righe[_curr];
|
||||
const real val = get("RICAVI").as_real();
|
||||
if (!val.is_zero())
|
||||
{
|
||||
int indice = get("LEVEL").as_int();
|
||||
const TString& codcms = get("CODCMS").as_string();
|
||||
|
||||
TAssoc_array& riga_tot = get_row((TAssoc_array&)_totali[indice], codcms, indice, codcms, EMPTY_STRING, EMPTY_STRING,
|
||||
"RICAVI");
|
||||
const TString* stric = (const TString*)riga_tot.objptr("RICAVI");
|
||||
if (stric && stric->full())
|
||||
{
|
||||
const real totric = *stric;
|
||||
if (!totric.is_zero())
|
||||
avanzamento = val * CENTO / totric;
|
||||
}
|
||||
}
|
||||
}
|
||||
var.set(avanzamento);
|
||||
}
|
||||
|
@ -57,9 +57,10 @@ public:
|
||||
///////////////////////////////////////////////////////////////
|
||||
class TPrint_saldana_recordset : public TRecordset
|
||||
{
|
||||
TRecnotype _curr;
|
||||
TArray _righe;
|
||||
TRecnotype _curr;
|
||||
TArray _colonne;
|
||||
TAssoc_array _totali[4];
|
||||
TIndbil_cache _indicatori;
|
||||
TEsercizi_contabili _esc;
|
||||
|
||||
@ -100,7 +101,7 @@ protected:
|
||||
|
||||
TAssoc_array& get_row(TAssoc_array& cms, const char* chiave,
|
||||
const int indice, const TString& codcms, const TString& fase,
|
||||
const TString& cdc, const TString& descrizione);
|
||||
const TString& cdc, const TString& descrizione) const;
|
||||
|
||||
public:
|
||||
virtual void set_filter(const TMask& msk, const TString& curr_sublevel);
|
||||
|
@ -54,7 +54,7 @@ Picture = <ca01>
|
||||
Module = 22
|
||||
Flags = ""
|
||||
Item_01 = "Gestione movimenti", "ca2 -0", "F"
|
||||
Item_02 = "Ribaltamento movimenti", "ca2 -1", "F"
|
||||
Item_02 = "Ripartizione movimenti", "ca2 -1", "F"
|
||||
|
||||
[CAMENU_040]
|
||||
Caption = "Stampe"
|
||||
|
Loading…
x
Reference in New Issue
Block a user