Patch level :10.0 350
Files correlati : Ricompilazione Demo : [ ] Commento : riportate modifiche dalla 5.0 per stampa bilancio alla data git-svn-id: svn://10.65.10.50/trunk@19054 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
29a2602aa6
commit
2415dd3fb8
@ -1,9 +1,11 @@
|
||||
// gestione files Contabilita' Analitica: CENTRI DI COSTO
|
||||
#include <execp.h>
|
||||
#include <recset.h>
|
||||
#include <relapp.h>
|
||||
|
||||
#include "calib01.h"
|
||||
#include "ca0500a.h"
|
||||
#include "cdc.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//MASCHERA
|
||||
@ -31,6 +33,7 @@ protected:
|
||||
|
||||
virtual void init_modify_mode(TMask& mask);
|
||||
virtual void init_insert_mode(TMask& mask);
|
||||
virtual bool protected_record(TRectype& record);
|
||||
virtual TSimple_anal_msk* create_mask() const { return new TCdC_anal_msk; }
|
||||
virtual bool user_create();
|
||||
};
|
||||
@ -42,6 +45,23 @@ bool TCdC_app::filtered() const
|
||||
return TAnal_app::filtered();
|
||||
}
|
||||
|
||||
//non si può eliminare un cdc se esso appare in un saldo analitico dell'anno in corso o dell'anno precedente
|
||||
bool TCdC_app::protected_record(TRectype& record)
|
||||
{
|
||||
TString query;
|
||||
query << "USE SALDANA\nSELECT COSTO==#COSTO\nFROM ANNO=#ANNO\n";
|
||||
const TString cdc = record.get(CDC_CODCOSTO);
|
||||
const TDate today(TODAY);
|
||||
const long anno = today.year();
|
||||
|
||||
TISAM_recordset saldana_recset(query);
|
||||
saldana_recset.set_var("#COSTO", TVariant(cdc));
|
||||
saldana_recset.set_var("#ANNO", TVariant(anno - 1));
|
||||
|
||||
const long items = saldana_recset.items();
|
||||
return items > 0;
|
||||
}
|
||||
|
||||
void TCdC_app::init_modify_mode(TMask& mask)
|
||||
{
|
||||
const short id = ((TCdC_anal_msk &)mask).get_field_id(_maxlev - 1, 1);
|
||||
|
@ -1,5 +1,6 @@
|
||||
// gestione files Contabilita' Analitica: COMMESSE
|
||||
#include <execp.h>
|
||||
#include <recset.h>
|
||||
#include <relapp.h>
|
||||
|
||||
#include "calib01.h"
|
||||
@ -36,10 +37,11 @@ class TCms_app : public TAnal_app
|
||||
protected:
|
||||
virtual const char * extra_modules() const {return "cm";} //funziona anche con autorizzazione CM
|
||||
|
||||
virtual bool filtered() const;
|
||||
virtual bool filtered() const;
|
||||
|
||||
virtual void init_modify_mode(TMask& mask);
|
||||
virtual void init_insert_mode(TMask& mask);
|
||||
virtual bool protected_record(TRectype& record);
|
||||
virtual TSimple_anal_msk* create_mask() const { return new TCms_anal_msk; }
|
||||
virtual bool user_create();
|
||||
};
|
||||
@ -51,6 +53,23 @@ bool TCms_app::filtered() const
|
||||
return TAnal_app::filtered();
|
||||
}
|
||||
|
||||
//non si può eliminare una commessa se essa appare in un saldo analitico dell'anno in corso o dell'anno precedente
|
||||
bool TCms_app::protected_record(TRectype& record)
|
||||
{
|
||||
TString query;
|
||||
query << "USE SALDANA\nSELECT COMMESSA==#COMMESSA\nFROM ANNO=#ANNO\n";
|
||||
const TString commessa = record.get(COMMESSE_CODCMS);
|
||||
const TDate today(TODAY);
|
||||
const long anno = today.year();
|
||||
|
||||
TISAM_recordset saldana_recset(query);
|
||||
saldana_recset.set_var("#COMMESSA", TVariant(commessa));
|
||||
saldana_recset.set_var("#ANNO", TVariant(anno - 1));
|
||||
|
||||
const long items = saldana_recset.items();
|
||||
return items > 0;
|
||||
}
|
||||
|
||||
void TCms_app::init_modify_mode(TMask& mask)
|
||||
{
|
||||
const short id = ((TCms_anal_msk &)mask).get_field_id(_maxlev - 1 , 1);
|
||||
|
@ -1,10 +1,12 @@
|
||||
// gestione files Contabilita' Analitica: FASI
|
||||
#include <execp.h>
|
||||
#include <recset.h>
|
||||
#include <relapp.h>
|
||||
|
||||
#include "calib01.h"
|
||||
#include "calibmsk.h"
|
||||
#include "ca0700a.h"
|
||||
#include "fasi.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//MASCHERA
|
||||
@ -43,7 +45,7 @@ protected:
|
||||
virtual const char * extra_modules() const {return "cm";} //funziona anche con autorizzazione CM
|
||||
|
||||
virtual bool filtered() const;
|
||||
|
||||
virtual bool protected_record(TRectype& record);
|
||||
virtual TSimple_anal_msk* create_mask() const { return new TFsc_anal_msk; }
|
||||
virtual bool user_create();
|
||||
};
|
||||
@ -55,6 +57,40 @@ bool TFsc_app::filtered() const
|
||||
return TAnal_app::filtered();
|
||||
}
|
||||
|
||||
//non si può eliminare una fase se essa appare in un saldo analitico dell'anno in corso o dell'anno precedente
|
||||
bool TFsc_app::protected_record(TRectype& record)
|
||||
{
|
||||
TString query;
|
||||
query << "USE SALDANA\nSELECT (FASE==#FASE)";
|
||||
//controlla se le fasi sono figlie delle commesse o dei centri di costo o semplici figlie di nessuno
|
||||
const TString& fath_fasi = ca_config().get("FathFasi");
|
||||
|
||||
if (fath_fasi == "CMS")
|
||||
query << "&&(COMMESSA==#COMMESSA)";
|
||||
|
||||
if (fath_fasi == "CDC")
|
||||
query << "&&(COSTO==#COSTO)";
|
||||
|
||||
query << "\nFROM ANNO=#ANNO";
|
||||
|
||||
const TString fase = record.get(FASI_CODFASE);
|
||||
const TDate today(TODAY);
|
||||
const long anno = today.year();
|
||||
const TString codcmsfas = record.get(FASI_CODCMSFAS);
|
||||
|
||||
TISAM_recordset saldana_recset(query);
|
||||
|
||||
saldana_recset.set_var("#FASE", TVariant(fase));
|
||||
saldana_recset.set_var("#ANNO", TVariant(anno - 1));
|
||||
if (fath_fasi == "CMS")
|
||||
saldana_recset.set_var("#COMMESSA", TVariant(codcmsfas));
|
||||
if (fath_fasi == "CDC")
|
||||
saldana_recset.set_var("#COSTO", TVariant(codcmsfas));
|
||||
|
||||
const long items = saldana_recset.items();
|
||||
return items > 0;
|
||||
}
|
||||
|
||||
bool TFsc_app::user_create()
|
||||
{
|
||||
const TMultilevel_code_info& mci = ca_multilevel_code_info(LF_FASI);
|
||||
|
@ -189,7 +189,8 @@ protected:
|
||||
public:
|
||||
void set_filter(const TPrint_bilancio_cms_mask& msk, const TString& curr_fase);
|
||||
TPrint_bilancio_cms_rep(const char* rep_name, const TString& prefix, const int depth,
|
||||
const bool show_fasi, const bool show_cdc);
|
||||
const bool show_fasi, const bool show_cdc,
|
||||
const bool show_cms_descr, const bool show_cms_date);
|
||||
};
|
||||
|
||||
bool TPrint_bilancio_cms_rep::get_usr_val(const TString& name, TVariant& var) const
|
||||
@ -214,8 +215,9 @@ void TPrint_bilancio_cms_rep::set_filter(const TPrint_bilancio_cms_mask& msk, co
|
||||
}
|
||||
|
||||
TPrint_bilancio_cms_rep::TPrint_bilancio_cms_rep(const char* rep_name, const TString& prefix,
|
||||
const int depth, const bool show_fasi, const bool show_cdc)
|
||||
:TCRPA_report(rep_name, prefix, depth, show_fasi, show_cdc)
|
||||
const int depth, const bool show_fasi, const bool show_cdc,
|
||||
const bool show_cms_descr, const bool show_cms_date)
|
||||
:TCRPA_report(rep_name, prefix, depth, show_fasi, show_cdc, show_cms_descr, show_cms_date)
|
||||
{
|
||||
}
|
||||
|
||||
@ -256,13 +258,17 @@ void TPrint_bilancio_cms::main_loop()
|
||||
const bool group_cdc = tipostampa == 8;
|
||||
const bool show_cdc = use_cdc && cdc.empty();
|
||||
|
||||
//descrizioni
|
||||
const bool show_cms_descr = mask.get_bool(F_SHOW_CMS_DESCR);
|
||||
const bool show_cms_date = mask.get_bool(F_SHOW_CMS_DATE);
|
||||
|
||||
if (path.empty())
|
||||
{
|
||||
path = mask.get_report_class();
|
||||
}
|
||||
|
||||
//crea il report in base ai parametri (tipo report,struttura,profondita' di stampa)
|
||||
TPrint_bilancio_cms_rep rep(path, prefix, depth, show_fasi, show_cdc);
|
||||
TPrint_bilancio_cms_rep rep(path, prefix, depth, show_fasi, show_cdc, show_cms_descr, show_cms_date);
|
||||
|
||||
//se e' una stampa di tipo fasi riassunte (crpa special edition) deve fare lo scanning di tutte le fasi..
|
||||
//..singolarmente e stampare un report per ogni fase.Senno' stampa un solo report
|
||||
@ -328,3 +334,19 @@ int ca3800(int argc, char* argv[])
|
||||
a.run(argc, argv, TR("Stampa bilancio di commessa"));
|
||||
return 0;
|
||||
}
|
||||
|
||||
//Istruzioni per i programmi ca3800 e ca3900
|
||||
//------------------------------------------
|
||||
// CA_3800
|
||||
// Gestore maschera ca3800 (Analisi Bilancio di Commessa)
|
||||
// Creatore del report e dell'applicazione
|
||||
|
||||
// CA_3801
|
||||
// Gestore dei report a colonne variabili (stampa in base a struttura scelta per il PCONANA). Serve solo per ca3800.
|
||||
|
||||
// CA_3883
|
||||
// Gestore del recordset per il calcolo dei valori da mettere sulle stampe (è il nucleo dei programmi ca3800 e ca3900)
|
||||
|
||||
// CA_3900
|
||||
// Gestore maschera ca3900 (Stima ricavi di competenza)
|
||||
// Creatore del report e dell'applicazione
|
@ -1,7 +1,9 @@
|
||||
#include "ca3883a.h"
|
||||
|
||||
TOOLBAR "topbar" 0 0 0 2
|
||||
|
||||
#include <printbar.h>
|
||||
|
||||
ENDPAGE
|
||||
|
||||
PAGE "Stampa bilancio commessa" 0 2 0 0
|
||||
@ -45,15 +47,25 @@ END
|
||||
|
||||
BOOLEAN F_INCLUDE_DOCUMENTI
|
||||
BEGIN
|
||||
PROMPT 1 4 "Includere documenti non contabilizzati (di tipo ordine)"
|
||||
PROMPT 1 4 "Includere documenti inevasi e/o non contabilizzati"
|
||||
END
|
||||
|
||||
DATE F_DATASTAMPA
|
||||
BEGIN
|
||||
PROMPT 2 6 "Data stampa "
|
||||
PROMPT 0 6 "Data stampa "
|
||||
FLAGS "A"
|
||||
END
|
||||
|
||||
BOOLEAN F_SHOW_CMS_DESCR
|
||||
BEGIN
|
||||
PROMPT 25 6 "Mostrare descr. commesse"
|
||||
END
|
||||
|
||||
BOOLEAN F_SHOW_CMS_DATE
|
||||
BEGIN
|
||||
PROMPT 53 6 "Mostrare date commesse"
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 76 7
|
||||
BEGIN
|
||||
PROMPT 0 7 "@bParametri"
|
||||
@ -134,7 +146,7 @@ END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
PAGE "Istruzioni" 0 2 0 0
|
||||
PAGE "Istruzioni" -1 -1 78 20
|
||||
|
||||
GROUPBOX DLG_NULL 78 9
|
||||
BEGIN
|
||||
@ -148,7 +160,7 @@ END
|
||||
|
||||
TEXT -1
|
||||
BEGIN
|
||||
PROMPT 1 3 " e finale dell'esercizio stesso. Solo il campo data è modificabile, accettando"
|
||||
PROMPT 1 3 " e finale dell'esercizio stesso. Solo il campo 'alla data' è modificabile, accettando"
|
||||
END
|
||||
|
||||
TEXT -1
|
||||
@ -188,9 +200,9 @@ END
|
||||
|
||||
TEXT -1
|
||||
BEGIN
|
||||
PROMPT 1 12 " non contabilizzati di tipo ordine con data inclusa nell'intervallo selezionato"
|
||||
PROMPT 1 12 " non contabilizzati e gli ordini inevasi con data inclusa nell'intervallo selezionato"
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
||||
ENDMASK
|
@ -20,9 +20,11 @@
|
||||
<source>#REPORT.PAGE</source>
|
||||
</field>
|
||||
<field border="1" x="1" y="3" type="Linea" width="169" height="0" pattern="1" />
|
||||
<field x="43" y="2" type="Testo" align="center" width="6" id="3" pattern="1" text="Fase" />
|
||||
<field x="50.5" y="2" type="Testo" align="center" width="6" id="4" pattern="1" text="CdC" />
|
||||
<field x="56" y="2" type="Array" align="center" width="7" id="5" pattern="1">
|
||||
<field x="41" y="2" type="Testo" align="center" width="6" id="3" pattern="1" text="Inizio" />
|
||||
<field x="46.5" y="2" type="Testo" align="center" width="6" id="4" pattern="1" text="Fine" />
|
||||
<field x="51" y="2" type="Testo" align="center" width="6" id="5" pattern="1" text="Fase" />
|
||||
<field x="58.5" y="2" type="Testo" align="center" width="6" id="6" pattern="1" text="CdC" />
|
||||
<field x="64" y="2" type="Array" align="center" width="7" id="7" pattern="1">
|
||||
<source>TIPOSTIMA</source>
|
||||
<list>
|
||||
<li Value="% Av." Code="T" />
|
||||
@ -30,9 +32,9 @@
|
||||
<li Value="% Ric." Code="R" />
|
||||
</list>
|
||||
</field>
|
||||
<field x="61" y="2" type="Testo" align="right" width="13" id="69" pattern="1" text="Testata" />
|
||||
<field x="69" y="2" type="Testo" align="right" width="13" id="69" pattern="1" text="Testata" />
|
||||
<field x="1" y="2" type="Testo" width="15" id="121" pattern="1" text="Commessa" />
|
||||
<field x="75" y="1" type="Stringa" valign="bottom" align="right" width="13" height="2" id="169" pattern="1">
|
||||
<field x="83" y="1" type="Stringa" valign="bottom" align="right" width="13" height="2" id="169" pattern="1">
|
||||
<source>"MARGINE CONTRIBUZIONE"</source>
|
||||
</field>
|
||||
</section>
|
||||
@ -173,11 +175,19 @@
|
||||
</field>
|
||||
<field x="18" type="Stringa" width="25" id="2" pattern="1">
|
||||
<font face="Arial Narrow" size="7" />
|
||||
<source>IF(#H4.3=0;DESCRIZ;"")</source>
|
||||
<source>DESCRIZ</source>
|
||||
</field>
|
||||
<field x="43.5" type="Stringa" width="9" id="3" pattern="1">
|
||||
<field x="43" type="Data" align="center" width="6" id="3" pattern="1">
|
||||
<font face="Arial Narrow" size="7" />
|
||||
<source>DATAINI</source>
|
||||
</field>
|
||||
<field x="49" type="Data" align="center" width="6" id="4" pattern="1">
|
||||
<font face="Arial Narrow" size="7" />
|
||||
<source>DATAFINE</source>
|
||||
</field>
|
||||
<field x="55" type="Stringa" width="9" id="5" pattern="1">
|
||||
<source>FASE</source>
|
||||
<prescript description="B1.3 PRESCRIPT">#STAMPAFASI @
|
||||
<prescript description="B1.5 PRESCRIPT">#STAMPAFASI @
|
||||
EMPTY= IF
|
||||
#THIS HIDE
|
||||
ELSE
|
||||
@ -185,9 +195,9 @@ ELSE
|
||||
THEN
|
||||
</prescript>
|
||||
</field>
|
||||
<field x="52.5" type="Stringa" width="5" id="4" pattern="1">
|
||||
<field x="64" type="Stringa" width="5" id="6" pattern="1">
|
||||
<source>CDC</source>
|
||||
<prescript description="B1.4 PRESCRIPT">#STAMPACDC @
|
||||
<prescript description="B1.6 PRESCRIPT">#STAMPACDC @
|
||||
EMPTY= IF
|
||||
#THIS HIDE
|
||||
ELSE
|
||||
@ -195,20 +205,20 @@ ELSE
|
||||
THEN
|
||||
</prescript>
|
||||
</field>
|
||||
<field x="57.5" type="Numero" align="right" width="3.5" id="5" pattern="1">
|
||||
<field x="69" type="Numero" align="right" width="3.5" id="7" pattern="1">
|
||||
<font italic="1" face="Arial Narrow" size="8" />
|
||||
<source>ROUND(AVANZAMENTO;0)</source>
|
||||
</field>
|
||||
<field x="61" type="Valuta" align="right" width="13" id="69" pattern="1" text="###.###.###,@@">
|
||||
<field x="72.5" type="Valuta" align="right" width="13" id="69" pattern="1" text="###.###.###,@@">
|
||||
<postscript description="B1.69 POSTSCRIPT">MESSAGE ADD,F4.69
|
||||
MESSAGE ADD,F3.69</postscript>
|
||||
</field>
|
||||
<field x="74.5" type="Valuta" align="right" width="13" id="169" pattern="1" text="###.###.###,@@">
|
||||
<field x="86" type="Valuta" align="right" width="13" id="169" pattern="1" text="###.###.###,@@">
|
||||
<source>#RICAVI-#COSTI</source>
|
||||
<postscript description="B1.169 POSTSCRIPT">MESSAGE ADD,F4.169
|
||||
MESSAGE ADD,F3.169</postscript>
|
||||
</field>
|
||||
<field x="87.5" type="Numero" align="right" width="4" id="170" pattern="1">
|
||||
<field x="99" type="Numero" align="right" width="4" id="170" pattern="1">
|
||||
<font italic="1" face="Arial Narrow" size="8" />
|
||||
<prescript description="B1.170 PRESCRIPT">#RICAVI @
|
||||
EMPTY= IF
|
||||
@ -226,7 +236,7 @@ ROUND
|
||||
THEN
|
||||
#THIS !</prescript>
|
||||
</field>
|
||||
<field x="91.5" type="Testo" align="center" width="2" id="171" pattern="1" text="%" />
|
||||
<field x="103" type="Testo" align="center" width="2" id="171" pattern="1" text="%" />
|
||||
<field type="Numero" hidden="1" align="right" width="1" id="200" pattern="1">
|
||||
<prescript description="B1.200 PRESCRIPT">#THIS @
|
||||
1
|
||||
|
456
ca/ca3801.cpp
Executable file
456
ca/ca3801.cpp
Executable file
@ -0,0 +1,456 @@
|
||||
#include "calib01.h"
|
||||
#include "calib02.h"
|
||||
|
||||
#include "ca3883.h"
|
||||
|
||||
#include "pconana.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//Classe di report speciale con numero colonne adattabile in base ad un parametro
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void TCRPA_report::merge_array(TString_array& c, TString_array& t,
|
||||
TString_array& codici, TString_array& testate) const
|
||||
{
|
||||
while (c.items() > 0)
|
||||
{
|
||||
TObject* cod = c.remove(0,true);
|
||||
TObject* tes = t.remove(0,true);
|
||||
codici.TArray::add(cod);
|
||||
testate.TArray::add(tes);
|
||||
}
|
||||
}
|
||||
|
||||
void TCRPA_report::analize_pconana_structure (const TString& prefix, const int depth,
|
||||
TString_array& codici, TString_array& testate) const
|
||||
{
|
||||
//cerca quale e' la lunghezza della stringa conto da considerare in base alla depth scelta
|
||||
TConfig& cfg = ca_config();
|
||||
const TMultilevel_code_info& pconana_info = ca_multilevel_code_info(LF_PCONANA);
|
||||
const long total_length = pconana_info.total_len(depth);
|
||||
|
||||
//scandisce il piano dei conti analitico alla ricerca dei conti di lunghezza pari a..
|
||||
//..quella appena ricavata
|
||||
TISAM_recordset recset("USE PCONANA\nSELECT LEN(CODCONTO)=#LUN\nFROM CODCONTO=#PREFIX\nTO CODCONTO=#PREFIX");
|
||||
recset.set_var("#LUN", TVariant(total_length));
|
||||
recset.set_var("#PREFIX", TVariant(prefix));
|
||||
const int prefix_length = prefix.len();
|
||||
|
||||
TString_array codici_c, testate_c, codici_r, testate_r;
|
||||
|
||||
//riempie gli array con i codici conto di lunghezza opportuna e relative testate
|
||||
TString80 codice;
|
||||
for (bool ok = recset.move_first(); ok; ok = recset.move_next())
|
||||
{
|
||||
const TString& codconto = recset.get(PCONANA_CODCONTO).as_string();
|
||||
|
||||
const TAnal_bill zio(codconto);
|
||||
const int indbil = zio.indicatore_bilancio();
|
||||
//solo Costi e Ricavi!
|
||||
if (indbil == 3 || indbil == 4)
|
||||
{
|
||||
codice.cut(0) << "#RECORD." << codconto.mid(prefix_length);
|
||||
const TString& testata = zio.testata();
|
||||
if (indbil == 3)
|
||||
{
|
||||
codici_c.add(codice);
|
||||
testate_c.add(testata);
|
||||
}
|
||||
else
|
||||
{
|
||||
codici_r.add(codice);
|
||||
testate_r.add(testata);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (codici_r.items() == 1) //se il campo da stampare e' uno solo->e' il totale del livello
|
||||
{
|
||||
codici_r.destroy();
|
||||
testate_r.destroy();
|
||||
}
|
||||
codici_r.add("#RICAVI");
|
||||
testate_r.add(TR("RICAVI"));
|
||||
|
||||
//..analogo per i Costi
|
||||
if (codici_c.items() == 1)
|
||||
{
|
||||
codici_c.destroy();
|
||||
testate_c.destroy();
|
||||
}
|
||||
codici_c.add("#COSTI");
|
||||
testate_c.add(TR("COSTI"));
|
||||
|
||||
//condensa gli array di Costo e Ricavo in un unico array che servira' di base per la stampa
|
||||
merge_array(codici_r, testate_r, codici, testate);
|
||||
merge_array(codici_c, testate_c, codici, testate);
|
||||
}
|
||||
|
||||
//metodo per il riempimento e lo spostamento dei campi della sola sezione F4 (totali di commessa)
|
||||
void TCRPA_report::offset_and_fill_sectionf4(TReport_section& rep_sect, const int model_id)
|
||||
{
|
||||
//campo modello
|
||||
TReport_field& rep_field = *rep_sect.find_field(model_id);
|
||||
//nuovo campo
|
||||
TReport_field* new_field = (TReport_field*)rep_field.dup();
|
||||
//lo aggiunge alla sezione
|
||||
rep_sect.add(new_field);
|
||||
//gli da' l'id (e' il terzultimo campo)
|
||||
TReport_section& b1 = section('B', 1);
|
||||
const int body_fields_number = b1.items();
|
||||
TReport_field& fld_costi = b1.field(body_fields_number - 3);
|
||||
new_field->set_id(fld_costi.id());
|
||||
|
||||
//posiziona tutti i campi della sezione
|
||||
for (int i = 0; i < rep_sect.items(); i++)
|
||||
{
|
||||
//c'e' il campo con il mio numero (id) in questa sezione?
|
||||
TReport_field& brock = rep_sect.field(i);
|
||||
if (brock.id() >= model_id)
|
||||
{
|
||||
//se c'e' cerco nel body il mio omonumero; se lo trovo mi allineo come lui
|
||||
//Es.: campi testata di pagina compaiono e si allineano in base ai campi body (fase,cdc ecc.)
|
||||
TReport_field* champ = b1.find_field(brock.id());
|
||||
if (champ != NULL)
|
||||
brock.set_column(champ->get_rect().left());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
int TCRPA_report::show_hide_left_column(const bool show_fld, TReport_field* fld, int x0)
|
||||
{
|
||||
if (fld != NULL)
|
||||
{
|
||||
if (show_fld)
|
||||
{
|
||||
fld->set_column(x0);
|
||||
x0 = fld->get_rect().right();
|
||||
}
|
||||
else
|
||||
fld->deactivate();
|
||||
}
|
||||
return x0;
|
||||
}
|
||||
|
||||
|
||||
//metodo per il riempimento e lo spostamento dei campi dinamici
|
||||
void TCRPA_report::offset_and_fill_columns(TReport_section& rep_sect, const TString_array& str_arr,
|
||||
const int model_id, const bool show_fasi, const bool show_cdc,
|
||||
const bool show_cms_descr, const bool show_cms_date)
|
||||
{
|
||||
//solo nel caso sia richiesta la sparizione di un campo...
|
||||
if (!show_fasi || !show_cdc || !show_cms_descr || !show_cms_date)
|
||||
{
|
||||
if (rep_sect.type() == 'B') //campi del body
|
||||
{
|
||||
//gestione campi a sinistra del campo modello
|
||||
//la gestione dei campi a sinistra e' guidata dalle scelte utente sulla maschera
|
||||
//primo campo apparibile/scomparibile a sx del campo modello
|
||||
TReport_field* fld_cms_descr = rep_sect.find_field(2);
|
||||
|
||||
if (fld_cms_descr != NULL) //in caso non esista il campo non deve fare nulla (report riassuntivi x fase/cdc)
|
||||
{
|
||||
TReport_field* fld_dataini = rep_sect.find_field(3);
|
||||
TReport_field* fld_datafine = rep_sect.find_field(4);
|
||||
TReport_field* fld_fase = rep_sect.find_field(5);
|
||||
TReport_field* fld_cdc = rep_sect.find_field(6);
|
||||
TReport_field* fld_perc = rep_sect.find_field(7);
|
||||
|
||||
int x0 = fld_cms_descr->get_rect().left();
|
||||
|
||||
//mostra o no varie colonne a sx del campo esempio
|
||||
x0 = show_hide_left_column(show_cms_descr, fld_cms_descr, x0); //cms_descr
|
||||
x0 = show_hide_left_column(show_cms_date, fld_dataini, x0); //cms_dataini
|
||||
x0 = show_hide_left_column(show_cms_date, fld_datafine, x0); //cms_datafine
|
||||
x0 = show_hide_left_column(show_fasi, fld_fase, x0); //fasi
|
||||
x0 = show_hide_left_column(show_cdc, fld_cdc, x0); //cdc
|
||||
x0 = show_hide_left_column(true, fld_perc, x0); //perc
|
||||
|
||||
//campo modello
|
||||
rep_sect.find_field(model_id)->set_column(x0);
|
||||
} //if(fld_fase!=NULL..
|
||||
}
|
||||
else //campi non del body
|
||||
{
|
||||
TReport_section& b1 = section('B', 1);
|
||||
//sistema i campi tipo testata
|
||||
for (int i = 0; i < rep_sect.items(); i++)
|
||||
{
|
||||
//c'e' il campo con il mio numero (id) in questa sezione?
|
||||
TReport_field& brock = rep_sect.field(i);
|
||||
const int id = brock.id();
|
||||
if (id > 0)
|
||||
{
|
||||
//se c'e' cerco nel body il mio omonumero; se lo trovo mi mostro e allineo come lui
|
||||
//Es.: campi testata di pagina compaiono e si allineano in base ai campi body (fase,cdc ecc.)
|
||||
TReport_field* champ = b1.find_field(id);
|
||||
if (champ != NULL)
|
||||
{
|
||||
brock.activate(champ->active());
|
||||
brock.set_column(champ->get_rect().left());
|
||||
}
|
||||
} //if(id>0..
|
||||
} //for(int i=0;...
|
||||
} //else di if(rep_sect.type()=='B'...
|
||||
} //if(!show_fasi||!show_cdc...
|
||||
|
||||
TReport_field& rep_field = *rep_sect.find_field(model_id);
|
||||
|
||||
//prende il rettangolo del campo modello..
|
||||
const TRectangle& rep_field_rect = rep_field.get_rect();
|
||||
|
||||
//deve spostare i campi a destra della colonna modello
|
||||
//si memorizza i campi a destra del campo modello per poterli mettere a destra di tutti..
|
||||
//..i campi che saranno generati
|
||||
TPointer_array campi_a_destra;
|
||||
for (int j = 0; j < rep_sect.items(); j++)
|
||||
{
|
||||
const TReport_field& campo = rep_sect.field(j);
|
||||
//solo i campi con un identificatore vanno spostati; gli altri sono parte dello sfondo
|
||||
if (campo.id() > model_id)
|
||||
{
|
||||
const TRectangle& rct = campo.get_rect();
|
||||
//se il campo e' a destra del modello lo aggiunge all'array dei campi_a_destra
|
||||
if (rct.left() >= rep_field_rect.right())
|
||||
campi_a_destra.add(campo);
|
||||
}
|
||||
}
|
||||
|
||||
//duplica il campo modello e riempie i duplicati con i valori degli array
|
||||
//serve il tipo di sezione poiche' gli header vanno trattati diversamente dai body
|
||||
const char sect_type = rep_sect.type();
|
||||
|
||||
//ciclo su tutti gli elementi dell'array con i valori da settare nei nuovi campi
|
||||
for (int i = 0; i < str_arr.items(); i++)
|
||||
{
|
||||
//crea il nuovo campo i-esimo, copia del modello, spostato a destra rispetto al precedente (i-1)esimo..
|
||||
//.., con id(i) = id(i-1) + 1
|
||||
TReport_field* new_field = i == 0 ? &rep_field : (TReport_field*)rep_field.dup();
|
||||
if (i > 0)
|
||||
{
|
||||
rep_sect.add(new_field);
|
||||
new_field->set_pos(rep_field_rect.left() + rep_field_rect.width() * i, rep_field_rect.top());
|
||||
new_field->set_id(rep_field.id() + i);
|
||||
}
|
||||
switch (sect_type)
|
||||
{
|
||||
case 'H': //gli header devono stampare l'intestazione
|
||||
{
|
||||
new_field->set_picture(str_arr.row(i));
|
||||
}
|
||||
break;
|
||||
case 'B': //i body devono stampare i valori e sommarli ai totali nei footer
|
||||
{
|
||||
new_field->set_field(str_arr.row(i));
|
||||
TString ps = "MESSAGE ADD,F3.";
|
||||
ps << new_field->id();
|
||||
|
||||
if (find_section('F', 4) != NULL)
|
||||
ps << "|ADD,F4." << new_field->id();
|
||||
|
||||
new_field->set_postscript(ps);
|
||||
}
|
||||
break;
|
||||
case 'F': //i footer devono calcolarsi i totali; ma i footer di totale fasi (4) non devono..
|
||||
//..fare assolutamente nulla!
|
||||
if (rep_sect.level() > 0 && rep_sect.level() < 4)
|
||||
{
|
||||
//crea il campo sul report con tanto di id,postscript ecc...
|
||||
new_field->set_field("");
|
||||
|
||||
switch (rep_sect.level())
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
//caso particolare del footer di report con i totali alla Adolf!
|
||||
//Dalla matematica secondo Adolf:
|
||||
//(a) TotGen = TotCmsNor + TotCmsSupp
|
||||
//(b) DiffGen = TotCmsSupp - TotCmsNor
|
||||
//->(c) DiffGen = TotGen - 2*TotCmsNor
|
||||
|
||||
//i campi del totale generale si sommano ai campi delle differenze di Adolf
|
||||
/**CAZZONE** tentata per utilizzare la (c) ma non funziona:questi non servono a una ceppa di minchia
|
||||
new_field->set_field("");
|
||||
TString ps = "MESSAGE ADD,F";
|
||||
ps << (rep_sect.level()) << '.' << (new_field->id() + 200);
|
||||
new_field->set_prescript(ps);*/
|
||||
|
||||
//sub_new_field e' il campo SOTTO il new_field che appare solo nei totali di sezione 1 (F1)
|
||||
//e' il campo che va nella riga delle Differenze
|
||||
TReport_field* sub_new_field = (TReport_field*)new_field->dup();
|
||||
rep_sect.add(sub_new_field);
|
||||
sub_new_field->offset(TPoint(0, 250));
|
||||
sub_new_field->set_id(new_field->id() + 200);
|
||||
sub_new_field->set_groups("90");
|
||||
sub_new_field->set_prescript("");
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
{
|
||||
//ogni campo di footer F2 deve sommarsi a quello piu' esterno F1
|
||||
TString ps = "MESSAGE ADD,F";
|
||||
ps << (rep_sect.level() - 1) << '.' << new_field->id();
|
||||
|
||||
//in caso di Commesse Supporto (LEVEL=4) il totale si deve sommare nelle differenze generali
|
||||
ps << "\n#101 @\n";
|
||||
ps << "4 = IF\n";
|
||||
ps << " MESSAGE ADD,F1." << (new_field->id() + 200) << "\n";
|
||||
ps << "THEN";
|
||||
|
||||
//setta il postscript al new_field
|
||||
new_field->set_postscript(ps);
|
||||
|
||||
//SUB_new_field, ovvero gestione dei campi adolfici dei totali e delle differenze
|
||||
//Gestione totali delle commesse normali (Adolf!)
|
||||
//Alla fine di tutte le 4 sezioni di commesse normali ci va il totale delle medesime; questo..
|
||||
//..totale va stampato prima della sezione con le commesse di appoggio
|
||||
|
||||
//sub_new_field e' il campo SOTTO il new_field che appare solo nei totali di sezione 2 (F2)
|
||||
//e' il campo con il totale delle commesse normali
|
||||
TReport_field* sub_new_field = (TReport_field*)new_field->dup();
|
||||
rep_sect.add(sub_new_field);
|
||||
sub_new_field->offset(TPoint(0, 250));
|
||||
sub_new_field->set_id(new_field->id() + 200);
|
||||
sub_new_field->set_groups("90");
|
||||
sub_new_field->set_postscript("");
|
||||
|
||||
//il totale delle commesse normali si sottrae nelle differenze generali
|
||||
TString ps_diff;
|
||||
//ps_diff << "#THIS @\n2\n*\n!\n"; **CAZZONE** tentata per applicare la (c);non funzia
|
||||
ps_diff << "MESSAGE SUB,F1." << sub_new_field->id();
|
||||
sub_new_field->set_postscript(ps_diff);
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
{
|
||||
//ogni campo di footer F3 deve sommarsi a quello piu' esterno F2
|
||||
TString ps = "MESSAGE ADD,F";
|
||||
ps << (rep_sect.level() - 1) << '.' << new_field->id();
|
||||
//deve anche sommarsi al totale delle Commesse Normali (che viene stampato al passaggio tra..
|
||||
//..LEVEL=3 e LEVEL=4)
|
||||
ps << "\nMESSAGE ADD,F2." << (new_field->id() + 200);
|
||||
//setta il postscript al new_field
|
||||
new_field->set_postscript(ps);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
} //switch(rep_sect.level())
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
} //switch (sect_type)
|
||||
} //for(inti=0;i<str_arr.items()...
|
||||
|
||||
//sposta a destra gli ultimi campi non generati (169 e 170)
|
||||
const TReport_field& ultimo_campo = rep_sect.field(rep_sect.last());
|
||||
int x0 = ultimo_campo.get_rect().right();
|
||||
for (int k = 0; k < campi_a_destra.items(); k++)
|
||||
{
|
||||
TReport_field& campo = (TReport_field&)campi_a_destra[k];
|
||||
campo.set_column(x0);
|
||||
x0 = campo.get_rect().right();
|
||||
}
|
||||
|
||||
//l'ultimo campo (margine di contribuzione) va generato a mano nel caso dei totali delle commesse normali!!
|
||||
if (rep_sect.type() == 'F' && rep_sect.level() == 2)
|
||||
{
|
||||
TReport_field* sub_new_field_margine = (TReport_field*)rep_sect.find_field(169)->dup();
|
||||
rep_sect.add(sub_new_field_margine);
|
||||
sub_new_field_margine->offset(TPoint(0, 250));
|
||||
sub_new_field_margine->set_id(369);
|
||||
sub_new_field_margine->set_groups("90");
|
||||
sub_new_field_margine->set_postscript("");
|
||||
}
|
||||
|
||||
//ordina i campi davvero sul report per id
|
||||
rep_sect.sort();
|
||||
}
|
||||
|
||||
|
||||
bool TCRPA_report::generate_columns (TString_array& codici, TString_array& testate, const int model_id,
|
||||
const bool show_fasi, const bool show_cdc, const bool show_cms_descr,
|
||||
const bool show_cms_date)
|
||||
{
|
||||
//sezioni del report da modificare
|
||||
TReport_section& b1 = section('B', 1);
|
||||
|
||||
//controllo dell'esistenza dei campi modello da replicare e loro duplicazione e riempimento!
|
||||
TReport_field* b1_model = b1.find_field(model_id);
|
||||
if (b1_model == NULL)
|
||||
return false;
|
||||
offset_and_fill_columns(b1, codici, model_id, show_fasi, show_cdc, show_cms_descr, show_cms_date);
|
||||
|
||||
//testate
|
||||
//la testata di pagina deve invece riempire le intestazioni delle colonne generate
|
||||
TReport_section& h0 = section('H', 0);
|
||||
|
||||
TReport_field* h0_model = h0.find_field(model_id);
|
||||
if (h0_model == NULL)
|
||||
warning_box(TR("Manca l'intestazione della colonna modello (H0.%d)"),model_id);
|
||||
else
|
||||
offset_and_fill_columns(h0, testate, model_id, show_fasi, show_cdc, show_cms_descr, show_cms_date);
|
||||
|
||||
//le testate di sezione devono resettare i campi totale dei corrispondenti footers
|
||||
for (int j = 4; j > 0; j--)
|
||||
{
|
||||
TReport_section& head = section('H', j);
|
||||
if (head.items() > 0)
|
||||
{
|
||||
TString ps(256);
|
||||
ps = "MESSAGE ";
|
||||
//i campi dei totali da resettare sono tanti quante le colonne generate
|
||||
//k=0 per includere la colonna 69!!! usata nel caso i ricavi siano solo di livello 1 (depth=1)
|
||||
for (int k = 0; k <= codici.items(); k++)
|
||||
{
|
||||
if (k > 0)
|
||||
ps << '|';
|
||||
ps << "RESET,F" << head.level() << '.' << (k+model_id);
|
||||
}
|
||||
head.set_prescript(ps);
|
||||
}
|
||||
}
|
||||
|
||||
//footers
|
||||
for (int i = find_max_level('F') - 1; i > 0; i--)
|
||||
{
|
||||
TReport_section& foot = section('F', i);
|
||||
|
||||
TReport_field* foot_model = foot.find_field(model_id);
|
||||
if (foot_model == NULL)
|
||||
warning_box(TR("Manca la colonna modello (F%d.%d)"), i, model_id);
|
||||
else
|
||||
offset_and_fill_columns(foot, codici, model_id, show_fasi, show_cdc, show_cms_descr, show_cms_date);
|
||||
}
|
||||
|
||||
//gestione della sezione con i totali di commessa (solo se esiste, visto che non c'e' in tutti i report)
|
||||
TReport_section* f4 = find_section('F', 4);
|
||||
if (f4 != NULL)
|
||||
offset_and_fill_sectionf4(*f4, model_id);
|
||||
|
||||
#ifdef DBG
|
||||
save("cazzone.rep");
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
TCRPA_report::TCRPA_report (const char* rep_name, const TString& prefix, const int depth,
|
||||
const bool show_fasi, const bool show_cdc,
|
||||
const bool show_cms_descr, const bool show_cms_date)
|
||||
{
|
||||
//che report usare?
|
||||
load (rep_name);
|
||||
//array contenenti i conti analitici e le loro descrizioni di testata che diventeranno..
|
||||
//.colonne del report dopo lungo e periglioso travaglio
|
||||
TString_array codici, testate;
|
||||
//per prima cosa si deve analizzare la struttura del piano conti..
|
||||
//..da stampare fino al livello richiesto!
|
||||
analize_pconana_structure (prefix, depth, codici, testate);
|
||||
//poi vanno generate le colonne del report corrispondenti alla struttura analizzata
|
||||
generate_columns (codici, testate, 69, show_fasi, show_cdc, show_cms_descr, show_cms_date);
|
||||
}
|
1033
ca/ca3883.cpp
1033
ca/ca3883.cpp
File diff suppressed because it is too large
Load Diff
30
ca/ca3883.h
30
ca/ca3883.h
@ -42,13 +42,16 @@ protected:
|
||||
void analize_pconana_structure (const TString& prefix, const int depth,
|
||||
TString_array& codici, TString_array& testate) const;
|
||||
bool generate_columns (TString_array& codici, TString_array& testate, const int model_id,
|
||||
const bool show_fasi, const bool show_cdc);
|
||||
const bool show_fasi, const bool show_cdc, const bool show_cms_descr, const bool show_cms_date);
|
||||
void offset_and_fill_columns(TReport_section& rep_sect, const TString_array& str_arr,
|
||||
const int model_id, const bool show_fasi, const bool show_cdc);
|
||||
const int model_id, const bool show_fasi, const bool show_cdc,
|
||||
const bool show_cms_descr, const bool show_cms_date);
|
||||
void offset_and_fill_sectionf4(TReport_section& rep_sect, const int model_id);
|
||||
int show_hide_left_column(const bool show_fld, TReport_field* fld, int x0);
|
||||
|
||||
public:
|
||||
TCRPA_report (const char* rep_name, const TString& prefix, const int depth,
|
||||
const bool show_fasi, const bool show_cdc);
|
||||
const bool show_fasi, const bool show_cdc, const bool show_cms_descr, const bool show_cms_date);
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
@ -65,18 +68,22 @@ class TPrint_saldana_recordset : public TRecordset
|
||||
TIndbil_cache _indicatori;
|
||||
TEsercizi_contabili _esc;
|
||||
|
||||
TDate _datacalcolo;
|
||||
TString16 _fase;
|
||||
TString80 _cdc;
|
||||
|
||||
int _tipo;
|
||||
int _anno;
|
||||
TDate _datacalcolo;
|
||||
int _depth;
|
||||
int _tipostampa;
|
||||
|
||||
bool _vitaintera;
|
||||
bool _include_documenti;
|
||||
bool _tipodetr;
|
||||
bool _forza_maturato;
|
||||
|
||||
char _tipostima;
|
||||
TString16 _fase;
|
||||
TString80 _cdc;
|
||||
|
||||
|
||||
protected:
|
||||
virtual int tipo() const { return _tipo; }
|
||||
@ -97,8 +104,11 @@ protected:
|
||||
void elabora_rmovana(TAssoc_array* cms, const TDate& datainiesc, const TDate& datafinesc,
|
||||
const TRectype& movana, const TRectype& rmovana);
|
||||
void parse_rmovana(TAssoc_array* cms, const TDate& datainiesc, const TDate& datafinesc);
|
||||
void parse_saldana(TAssoc_array* cms, const TDate& datainiesc, const TDate& datafinesc, const TString& query);
|
||||
void parse_rdoc(TAssoc_array* cms, const TDate& datainiesc, const TDate& datafinesc);
|
||||
void parse_saldana(TAssoc_array* cms, const TDate& datainiesc, const TDate& datafinesc);
|
||||
void parse_saldana_futuri();
|
||||
void parse_rdoc_ordini(TAssoc_array* cms, const TDate& datainiesc, const TDate& datafinesc);
|
||||
void parse_rdoc_fatture(TAssoc_array* cms, const TDate& datainiesc, const TDate& datafinesc);
|
||||
TString crea_query_saldana();
|
||||
|
||||
//per il solo ca3800
|
||||
void aggiorna_importo(TAssoc_array& riga_array, const TString& livello, const int indbil,
|
||||
@ -108,9 +118,11 @@ protected:
|
||||
const TDate calcola_min_datacomp(const TDate& datainiesc, const TDate& datafinesc) const;
|
||||
int ricava_sezione_di_stampa(const TRectype& rec_commesse, const TDate& datainiesc, const TDate& datafinesc) const;
|
||||
TString ricava_chiave_cdc_fase(const TString& codcms, const TString& fase, const TString& cdc) const;
|
||||
int numerazioni_documenti(TString_array& num_doc, TString_array& tip_doc, const int tipo) const;
|
||||
int numerazioni_ordini(TString_array& num_ordini, TString_array& tip_ordini) const;
|
||||
int numerazioni_fatture(TString_array& num_fatture, TString_array& tip_fatture) const;
|
||||
|
||||
void create_lines_to_print(const TString& query);
|
||||
void create_lines_to_print();
|
||||
|
||||
//per il solo ca3900
|
||||
void aggiorna_importi(TAssoc_array& riga_array, const int indbil, const TRectype& saldana,
|
||||
|
@ -17,6 +17,8 @@
|
||||
#define F_TIPODETR 114
|
||||
#define F_FORZA_MATURATO 115
|
||||
#define F_INCLUDE_DOCUMENTI 116
|
||||
#define F_SHOW_CMS_DESCR 117
|
||||
#define F_SHOW_CMS_DATE 118
|
||||
|
||||
/* campi per la generazione automatica
|
||||
#define F_FASE1 112
|
||||
|
@ -207,3 +207,19 @@ int ca3900(int argc, char* argv[])
|
||||
a.run(argc, argv, TR("Stampa stima ricavi di competenza"));
|
||||
return 0;
|
||||
}
|
||||
|
||||
//Istruzioni per i programmi ca3800 e ca3900
|
||||
//------------------------------------------
|
||||
// CA_3800
|
||||
// Gestore maschera ca3800 (Analisi Bilancio di Commessa)
|
||||
// Creatore del report e dell'applicazione
|
||||
|
||||
// CA_3801
|
||||
// Gestore dei report a colonne variabili (stampa in base a struttura scelta per il PCONANA). Serve solo per ca3800.
|
||||
|
||||
// CA_3883
|
||||
// Gestore del recordset per il calcolo dei valori da mettere sulle stampe (è il nucleo dei programmi ca3800 e ca3900)
|
||||
|
||||
// CA_3900
|
||||
// Gestore maschera ca3900 (Stima ricavi di competenza)
|
||||
// Creatore del report e dell'applicazione
|
134
ca/ca3900a.rep
134
ca/ca3900a.rep
@ -19,19 +19,19 @@
|
||||
<field x="154" type="Numero" align="right" width="3" pattern="1">
|
||||
<source>#REPORT.PAGE</source>
|
||||
</field>
|
||||
<field border="2" x="1" y="1.5" type="Linea" width="169" height="0" pattern="1" />
|
||||
<field x="66.5" y="2" type="Testo" align="center" width="8" pattern="1" text="COSTI" />
|
||||
<field x="110" y="2" type="Testo" align="center" width="20" pattern="1" text="RICAVI" />
|
||||
<field x="155" y="2.25" type="Testo" align="right" width="8" pattern="1" text="Margine" />
|
||||
<field x="54" y="3" type="Testo" align="right" width="8" pattern="1" text="Budget" />
|
||||
<field x="64" y="3" type="Testo" align="right" width="12" pattern="1" text="Maturati" />
|
||||
<field x="78" y="3" type="Testo" align="right" width="12" pattern="1" text="Avanzamento" />
|
||||
<field x="91" y="3" type="Testo" align="right" width="12" pattern="1" text="Budget" />
|
||||
<field x="105" y="3" type="Testo" align="right" width="12" pattern="1" text="Competenza" />
|
||||
<field x="119" y="3" type="Testo" align="right" width="12" pattern="1" text="Accertato" />
|
||||
<field x="133" y="3" type="Testo" align="right" width="12" pattern="1" text="Integrazione" />
|
||||
<field x="153" y="3" type="Testo" align="right" width="12" pattern="1" text=" Contribuz. " />
|
||||
<field border="1" x="1" y="4" type="Linea" width="169" height="0" pattern="1" />
|
||||
<field border="2" x="1" y="1.5" type="Linea" width="164" height="0" pattern="1" />
|
||||
<field x="63.5" y="2" type="Testo" align="center" width="8" pattern="1" text="COSTI" />
|
||||
<field x="107" y="2" type="Testo" align="center" width="20" pattern="1" text="RICAVI" />
|
||||
<field x="152" y="2.25" type="Testo" align="right" width="8" pattern="1" text="Margine" />
|
||||
<field x="51" y="3" type="Testo" align="right" width="8" pattern="1" text="Budget" />
|
||||
<field x="61" y="3" type="Testo" align="right" width="12" pattern="1" text="Maturati" />
|
||||
<field x="75" y="3" type="Testo" align="right" width="12" pattern="1" text="Avanzamento" />
|
||||
<field x="88" y="3" type="Testo" align="right" width="12" pattern="1" text="Budget" />
|
||||
<field x="102" y="3" type="Testo" align="right" width="12" pattern="1" text="Competenza" />
|
||||
<field x="116" y="3" type="Testo" align="right" width="12" pattern="1" text="Accertato" />
|
||||
<field x="130" y="3" type="Testo" align="right" width="12" pattern="1" text="Integrazione" />
|
||||
<field x="150" y="3" type="Testo" align="right" width="12" pattern="1" text=" Contribuz. " />
|
||||
<field border="1" x="1" y="4" type="Linea" width="164" height="0" pattern="1" />
|
||||
<field x="1" y="3" type="Testo" width="15" id="121" pattern="1" text="Commessa" />
|
||||
</section>
|
||||
<section type="Head" level="1" height="4">
|
||||
@ -43,10 +43,10 @@ MESSAGE RESET,F1.105
|
||||
MESSAGE RESET,F1.106
|
||||
MESSAGE RESET,F1.107
|
||||
MESSAGE RESET,F1.108</prescript>
|
||||
<field border="1" radius="100" x="1" type="Testo" valign="center" align="center" shade_offset="25" width="167" height="2.5" text="STIMA RICAVI DI COMPETENZA">
|
||||
<field border="1" radius="100" x="2" type="Testo" valign="center" align="center" shade_offset="25" width="162" height="2.5" text="STIMA RICAVI DI COMPETENZA">
|
||||
<font face="Courier New" bold="1" size="16" />
|
||||
</field>
|
||||
<field border="2" x="1" y="3.5" type="Linea" width="169" height="0" pattern="1" />
|
||||
<field border="2" x="1" y="3.5" type="Linea" width="164" height="0" pattern="1" />
|
||||
<field x="0.96" y="3" type="Numero" hidden="1" align="right" width="4" id="2" pattern="1">
|
||||
<source>ANNO</source>
|
||||
</field>
|
||||
@ -74,7 +74,7 @@ MESSAGE RESET,F2.108</prescript>
|
||||
<field x="23" type="Numero" align="right" bg_color="#C0C0C0" width="6">
|
||||
<source>ANNO</source>
|
||||
</field>
|
||||
<field border="1" x="1" y="1.25" type="Linea" width="169" height="0" pattern="1" />
|
||||
<field border="1" x="1" y="1.25" type="Linea" width="164" height="0" pattern="1" />
|
||||
<field type="Numero" hidden="1" align="right" width="1" id="101" pattern="1">
|
||||
<source>LEVEL</source>
|
||||
<postscript description="H2.101 POSTSCRIPT">MESSAGE COPY,F2.101</postscript>
|
||||
@ -104,7 +104,7 @@ MESSAGE RESET,F3.108</prescript>
|
||||
<li Value="Commesse avviate nell'esercizio selezionato" Code="3" />
|
||||
</list>
|
||||
</field>
|
||||
<field border="1" x="2" y="1.25" type="Linea" width="169" height="0" pattern="1" />
|
||||
<field border="1" x="2" y="1.25" type="Linea" width="164" height="0" pattern="1" />
|
||||
<field type="Numero" hidden="1" align="right" width="1" id="101" pattern="1">
|
||||
<source>LEVEL</source>
|
||||
<postscript description="H3.101 POSTSCRIPT">MESSAGE COPY,F3.101</postscript>
|
||||
@ -112,24 +112,24 @@ MESSAGE RESET,F3.108</prescript>
|
||||
</section>
|
||||
<section type="Body" />
|
||||
<section type="Body" level="1">
|
||||
<field x="1" type="Stringa" width="20" pattern="1">
|
||||
<field x="1" type="Stringa" width="17" pattern="1">
|
||||
<source>CODCMS</source>
|
||||
</field>
|
||||
<field x="21" type="Stringa" width="27" pattern="1">
|
||||
<field x="18" type="Stringa" width="27" pattern="1">
|
||||
<font face="Arial Narrow" size="7" />
|
||||
<source>DESCRIZ</source>
|
||||
</field>
|
||||
<field x="86" type="Testo" align="center" width="2" pattern="1" text="%" />
|
||||
<field x="167" type="Testo" align="center" width="2" pattern="1" text="%" />
|
||||
<field x="48" type="Valuta" align="right" width="14" id="101" pattern="1" text="###.###.###,@@">
|
||||
<field x="83" type="Testo" align="center" width="2" pattern="1" text="%" />
|
||||
<field x="164" type="Testo" align="center" width="2" pattern="1" text="%" />
|
||||
<field x="45" type="Valuta" align="right" width="14" id="101" pattern="1" text="###.###.###,@@">
|
||||
<source>#COS_BDG</source>
|
||||
<postscript description="B1.101 POSTSCRIPT">MESSAGE ADD,F3.101</postscript>
|
||||
</field>
|
||||
<field x="62" type="Valuta" align="right" width="14" id="102" pattern="1" text="###.###.###,@@">
|
||||
<field x="59" type="Valuta" align="right" width="14" id="102" pattern="1" text="###.###.###,@@">
|
||||
<source>#COS_MAT</source>
|
||||
<postscript description="B1.102 POSTSCRIPT">MESSAGE ADD,F3.102</postscript>
|
||||
</field>
|
||||
<field x="80" type="Numero" align="right" width="6" id="103" pattern="1" text="##@,@@">
|
||||
<field x="77" type="Numero" align="right" width="6" id="103" pattern="1" text="##@,@@">
|
||||
<prescript description="B1.103 PRESCRIPT">#101 @ \ legge il budget
|
||||
0 = IF \ se 0 per evitare la divisione per 0 mette 100 nella %
|
||||
100
|
||||
@ -146,11 +146,11 @@ ELSE
|
||||
THEN
|
||||
#THIS !</prescript>
|
||||
</field>
|
||||
<field x="89" type="Valuta" align="right" width="14" id="104" pattern="1" text="###.###.###,@@">
|
||||
<field x="86" type="Valuta" align="right" width="14" id="104" pattern="1" text="###.###.###,@@">
|
||||
<source>#RIC_BDG</source>
|
||||
<postscript description="B1.104 POSTSCRIPT">MESSAGE ADD,F3.104</postscript>
|
||||
</field>
|
||||
<field x="103" type="Valuta" align="right" width="14" id="105" pattern="1" text="###.###.###,@@">
|
||||
<field x="100" type="Valuta" align="right" width="14" id="105" pattern="1" text="###.###.###,@@">
|
||||
<prescript description="B1.105 PRESCRIPT">#103 @
|
||||
#104 @
|
||||
*
|
||||
@ -159,18 +159,18 @@ THEN
|
||||
#THIS !</prescript>
|
||||
<postscript description="B1.105 POSTSCRIPT">MESSAGE ADD,F3.105</postscript>
|
||||
</field>
|
||||
<field x="117" type="Valuta" align="right" width="14" id="106" pattern="1" text="###.###.###,@@">
|
||||
<field x="114" type="Valuta" align="right" width="14" id="106" pattern="1" text="###.###.###,@@">
|
||||
<source>#RIC_MAT</source>
|
||||
<postscript description="B1.106 POSTSCRIPT">MESSAGE ADD,F3.106</postscript>
|
||||
</field>
|
||||
<field x="131" type="Valuta" align="right" width="14" id="107" pattern="1" text="###.###.###,@@">
|
||||
<field x="128" type="Valuta" align="right" width="14" id="107" pattern="1" text="###.###.###,@@">
|
||||
<prescript description="B1.107 PRESCRIPT">#105 @
|
||||
#106 @
|
||||
-
|
||||
#THIS !</prescript>
|
||||
<postscript description="B1.107 POSTSCRIPT">MESSAGE ADD,F3.107</postscript>
|
||||
</field>
|
||||
<field x="147" type="Valuta" align="right" width="14" id="108" pattern="1" text="###.###.###,@@">
|
||||
<field x="144" type="Valuta" align="right" width="14" id="108" pattern="1" text="###.###.###,@@">
|
||||
<prescript description="B1.108 PRESCRIPT">#105 @
|
||||
#102 @
|
||||
-
|
||||
@ -178,7 +178,7 @@ THEN
|
||||
</prescript>
|
||||
<postscript description="B1.108 POSTSCRIPT">MESSAGE ADD,F3.108</postscript>
|
||||
</field>
|
||||
<field x="162" type="Numero" align="right" width="5" id="109" pattern="1">
|
||||
<field x="159" type="Numero" align="right" width="5" id="109" pattern="1">
|
||||
<font italic="1" face="Arial Narrow" size="8" />
|
||||
<prescript description="B1.109 PRESCRIPT">#105 @
|
||||
0
|
||||
@ -198,7 +198,7 @@ THEN
|
||||
</field>
|
||||
</section>
|
||||
<section type="Foot">
|
||||
<field border="1" x="1" y="0.25" type="Linea" width="169" height="0" pattern="1" />
|
||||
<field border="1" x="1" y="0.25" type="Linea" width="164" height="0" pattern="1" />
|
||||
<field x="2" y="0.5" type="Testo" width="20" pattern="1" text="Stima ricavi di competenza">
|
||||
<font italic="1" face="Arial Narrow" bold="1" size="8" />
|
||||
</field>
|
||||
@ -209,13 +209,13 @@ THEN
|
||||
</section>
|
||||
<section type="Foot" level="1" height="3">
|
||||
<font italic="1" face="Arial Narrow" bold="1" size="8" />
|
||||
<field border="2" x="1" y="0.75" type="Linea" width="169" height="0" pattern="1" />
|
||||
<field border="2" x="1" y="0.75" type="Linea" width="164" height="0" pattern="1" />
|
||||
<field x="1" y="1.5" type="Testo" fg_color="#FFFFFF" bg_color="#000000" width="25" height="1.5" text="TOTALI GENERALI " />
|
||||
<field x="86" y="1.5" type="Testo" align="center" width="2" pattern="1" text="%" />
|
||||
<field x="167" y="1.5" type="Testo" align="center" width="2" pattern="1" text="%" />
|
||||
<field x="48" y="1.5" type="Valuta" align="right" width="14" id="101" pattern="1" text="###.###.###,@@" />
|
||||
<field x="62" y="1.5" type="Valuta" align="right" width="14" id="102" pattern="1" text="###.###.###,@@" />
|
||||
<field x="80" y="1.5" type="Numero" align="right" width="6" id="103" pattern="1" text="##@,@@">
|
||||
<field x="83" y="1.5" type="Testo" align="center" width="2" pattern="1" text="%" />
|
||||
<field x="164" y="1.5" type="Testo" align="center" width="2" pattern="1" text="%" />
|
||||
<field x="45" y="1.5" type="Valuta" align="right" width="14" id="101" pattern="1" text="###.###.###,@@" />
|
||||
<field x="59" y="1.5" type="Valuta" align="right" width="14" id="102" pattern="1" text="###.###.###,@@" />
|
||||
<field x="77" y="1.5" type="Numero" align="right" width="6" id="103" pattern="1" text="##@,@@">
|
||||
<prescript description="F1.103 PRESCRIPT">#101 @
|
||||
0 = IF
|
||||
100
|
||||
@ -232,12 +232,12 @@ ELSE
|
||||
THEN
|
||||
#THIS !</prescript>
|
||||
</field>
|
||||
<field x="89" y="1.5" type="Valuta" align="right" width="14" id="104" pattern="1" text="###.###.###,@@" />
|
||||
<field x="103" y="1.5" type="Valuta" align="right" width="14" id="105" pattern="1" text="###.###.###,@@" />
|
||||
<field x="117" y="1.5" type="Valuta" align="right" width="14" id="106" pattern="1" text="###.###.###,@@" />
|
||||
<field x="131" y="1.5" type="Valuta" align="right" width="14" id="107" pattern="1" text="###.###.###,@@" />
|
||||
<field x="147.5" y="1.5" type="Valuta" align="right" width="14" id="108" pattern="1" text="###.###.###,@@" />
|
||||
<field x="162" y="1.5" type="Numero" align="right" width="5" id="109" pattern="1">
|
||||
<field x="86" y="1.5" type="Valuta" align="right" width="14" id="104" pattern="1" text="###.###.###,@@" />
|
||||
<field x="100" y="1.5" type="Valuta" align="right" width="14" id="105" pattern="1" text="###.###.###,@@" />
|
||||
<field x="114" y="1.5" type="Valuta" align="right" width="14" id="106" pattern="1" text="###.###.###,@@" />
|
||||
<field x="128" y="1.5" type="Valuta" align="right" width="14" id="107" pattern="1" text="###.###.###,@@" />
|
||||
<field x="144.5" y="1.5" type="Valuta" align="right" width="14" id="108" pattern="1" text="###.###.###,@@" />
|
||||
<field x="159" y="1.5" type="Numero" align="right" width="5" id="109" pattern="1">
|
||||
<prescript description="F1.109 PRESCRIPT">#105 @
|
||||
0
|
||||
=
|
||||
@ -257,7 +257,7 @@ THEN
|
||||
</section>
|
||||
<section type="Foot" level="2" height="2.5">
|
||||
<font italic="1" face="Courier New" bold="1" size="8" />
|
||||
<field border="1" x="1" y="0.5" type="Linea" width="169" height="0" pattern="1" />
|
||||
<field border="1" x="1" y="0.5" type="Linea" width="164" height="0" pattern="1" />
|
||||
<field x="1" y="1" type="Array" bg_color="#C0C0C0" width="28">
|
||||
<font italic="1" face="Arial Narrow" bold="1" size="8" />
|
||||
<source>H2.101</source>
|
||||
@ -272,25 +272,25 @@ THEN
|
||||
<font italic="1" face="Arial Narrow" bold="1" size="8" />
|
||||
<source>H2.102</source>
|
||||
</field>
|
||||
<field x="86" y="1" type="Testo" align="center" width="2" pattern="1" text="%">
|
||||
<field x="83" y="1" type="Testo" align="center" width="2" pattern="1" text="%">
|
||||
<font italic="1" face="Arial Narrow" bold="1" size="8" />
|
||||
</field>
|
||||
<field x="167" y="1" type="Testo" align="center" width="2" pattern="1" text="%">
|
||||
<field x="164" y="1" type="Testo" align="center" width="2" pattern="1" text="%">
|
||||
<font italic="1" face="Arial Narrow" bold="1" size="8" />
|
||||
</field>
|
||||
<field y="1" type="Numero" hidden="1" align="right" width="1" id="101" pattern="1" />
|
||||
<field x="48" y="1" type="Valuta" align="right" width="14" id="101" pattern="1" text="###.###.###,@@">
|
||||
<field x="45" y="1" type="Valuta" align="right" width="14" id="101" pattern="1" text="###.###.###,@@">
|
||||
<font italic="1" face="Arial Narrow" bold="1" size="8" />
|
||||
<postscript description="F2.101 POSTSCRIPT">MESSAGE ADD,F1.101</postscript>
|
||||
</field>
|
||||
<field x="35" y="1" type="Numero" hidden="1" align="right" width="4" id="102" pattern="1">
|
||||
<postscript description="F2.102 POSTSCRIPT">MESSAGE COPY,F2.101</postscript>
|
||||
</field>
|
||||
<field x="62" y="1" type="Valuta" align="right" width="14" id="102" pattern="1" text="###.###.###,@@">
|
||||
<field x="59" y="1" type="Valuta" align="right" width="14" id="102" pattern="1" text="###.###.###,@@">
|
||||
<font italic="1" face="Arial Narrow" bold="1" size="8" />
|
||||
<postscript description="F2.102 POSTSCRIPT">MESSAGE ADD,F1.102</postscript>
|
||||
</field>
|
||||
<field x="80" y="1" type="Numero" align="right" width="6" id="103" pattern="1" text="##@,@@">
|
||||
<field x="77" y="1" type="Numero" align="right" width="6" id="103" pattern="1" text="##@,@@">
|
||||
<font italic="1" face="Arial Narrow" bold="1" size="8" />
|
||||
<prescript description="F2.103 PRESCRIPT">#101 @
|
||||
0 = IF
|
||||
@ -308,27 +308,27 @@ ELSE
|
||||
THEN
|
||||
#THIS !</prescript>
|
||||
</field>
|
||||
<field x="89" y="1" type="Valuta" align="right" width="14" id="104" pattern="1" text="###.###.###,@@">
|
||||
<field x="86" y="1" type="Valuta" align="right" width="14" id="104" pattern="1" text="###.###.###,@@">
|
||||
<font italic="1" face="Arial Narrow" bold="1" size="8" />
|
||||
<postscript description="F2.104 POSTSCRIPT">MESSAGE ADD,F1.104</postscript>
|
||||
</field>
|
||||
<field x="103" y="1" type="Valuta" align="right" width="14" id="105" pattern="1" text="###.###.###,@@">
|
||||
<field x="100" y="1" type="Valuta" align="right" width="14" id="105" pattern="1" text="###.###.###,@@">
|
||||
<font italic="1" face="Arial Narrow" bold="1" size="8" />
|
||||
<postscript description="F2.105 POSTSCRIPT">MESSAGE ADD,F1.105</postscript>
|
||||
</field>
|
||||
<field x="117" y="1" type="Valuta" align="right" width="14" id="106" pattern="1" text="###.###.###,@@">
|
||||
<field x="114" y="1" type="Valuta" align="right" width="14" id="106" pattern="1" text="###.###.###,@@">
|
||||
<font italic="1" face="Arial Narrow" bold="1" size="8" />
|
||||
<postscript description="F2.106 POSTSCRIPT">MESSAGE ADD,F1.106</postscript>
|
||||
</field>
|
||||
<field x="131" y="1" type="Valuta" align="right" width="14" id="107" pattern="1" text="###.###.###,@@">
|
||||
<field x="128" y="1" type="Valuta" align="right" width="14" id="107" pattern="1" text="###.###.###,@@">
|
||||
<font italic="1" face="Arial Narrow" bold="1" size="8" />
|
||||
<postscript description="F2.107 POSTSCRIPT">MESSAGE ADD,F1.107</postscript>
|
||||
</field>
|
||||
<field x="147" y="1" type="Valuta" align="right" width="14" id="108" pattern="1" text="###.###.###,@@">
|
||||
<field x="144" y="1" type="Valuta" align="right" width="14" id="108" pattern="1" text="###.###.###,@@">
|
||||
<font italic="1" face="Arial Narrow" bold="1" size="8" />
|
||||
<postscript description="F2.108 POSTSCRIPT">MESSAGE ADD,F1.108</postscript>
|
||||
</field>
|
||||
<field x="162" y="1" type="Numero" align="right" width="5" id="109" pattern="1">
|
||||
<field x="159" y="1" type="Numero" align="right" width="5" id="109" pattern="1">
|
||||
<font italic="1" face="Arial Narrow" bold="1" size="8" />
|
||||
<prescript description="F2.109 PRESCRIPT">#105 @
|
||||
0
|
||||
@ -349,7 +349,7 @@ THEN
|
||||
</section>
|
||||
<section type="Foot" level="3" height="2">
|
||||
<font italic="1" face="Arial Narrow" bold="1" size="8" />
|
||||
<field border="1" x="2" y="0.25" type="Linea" width="169" height="0" pattern="1" />
|
||||
<field border="1" x="2" y="0.25" type="Linea" width="164" height="0" pattern="1" />
|
||||
<field x="2" y="0.5" type="Array" bg_color="#C0C0C0" width="40" pattern="1">
|
||||
<source>H3.101</source>
|
||||
<list>
|
||||
@ -359,16 +359,16 @@ THEN
|
||||
<li Value="TOTALI Commesse avviate nell'esercizio selezionato" Code="3" />
|
||||
</list>
|
||||
</field>
|
||||
<field x="86" y="0.5" type="Testo" align="center" width="2" pattern="1" text="%" />
|
||||
<field x="167" y="0.5" type="Testo" align="center" width="2" pattern="1" text="%" />
|
||||
<field x="83" y="0.5" type="Testo" align="center" width="2" pattern="1" text="%" />
|
||||
<field x="164" y="0.5" type="Testo" align="center" width="2" pattern="1" text="%" />
|
||||
<field y="0.5" type="Numero" hidden="1" align="right" width="1" id="101" pattern="1" />
|
||||
<field x="48" y="0.5" type="Valuta" align="right" width="14" id="101" pattern="1" text="###.###.###,@@">
|
||||
<field x="45" y="0.5" type="Valuta" align="right" width="14" id="101" pattern="1" text="###.###.###,@@">
|
||||
<postscript description="F3.101 POSTSCRIPT">MESSAGE ADD,F2.101</postscript>
|
||||
</field>
|
||||
<field x="62" y="0.5" type="Valuta" align="right" width="14" id="102" pattern="1" text="###.###.###,@@">
|
||||
<field x="59" y="0.5" type="Valuta" align="right" width="14" id="102" pattern="1" text="###.###.###,@@">
|
||||
<postscript description="F3.102 POSTSCRIPT">MESSAGE ADD,F2.102</postscript>
|
||||
</field>
|
||||
<field x="80" y="0.5" type="Numero" align="right" width="6" id="103" pattern="1" text="##@,@@">
|
||||
<field x="77" y="0.5" type="Numero" align="right" width="6" id="103" pattern="1" text="##@,@@">
|
||||
<prescript description="F3.103 PRESCRIPT">#101 @
|
||||
0 = IF
|
||||
100
|
||||
@ -385,22 +385,22 @@ ELSE
|
||||
THEN
|
||||
#THIS !</prescript>
|
||||
</field>
|
||||
<field x="89" y="0.5" type="Valuta" align="right" width="14" id="104" pattern="1" text="###.###.###,@@">
|
||||
<field x="86" y="0.5" type="Valuta" align="right" width="14" id="104" pattern="1" text="###.###.###,@@">
|
||||
<postscript description="F3.104 POSTSCRIPT">MESSAGE ADD,F2.104</postscript>
|
||||
</field>
|
||||
<field x="103" y="0.5" type="Valuta" align="right" width="14" id="105" pattern="1" text="###.###.###,@@">
|
||||
<field x="100" y="0.5" type="Valuta" align="right" width="14" id="105" pattern="1" text="###.###.###,@@">
|
||||
<postscript description="F3.105 POSTSCRIPT">MESSAGE ADD,F2.105</postscript>
|
||||
</field>
|
||||
<field x="117" y="0.5" type="Valuta" align="right" width="14" id="106" pattern="1" text="###.###.###,@@">
|
||||
<field x="114" y="0.5" type="Valuta" align="right" width="14" id="106" pattern="1" text="###.###.###,@@">
|
||||
<postscript description="F3.106 POSTSCRIPT">MESSAGE ADD,F2.106</postscript>
|
||||
</field>
|
||||
<field x="131" y="0.5" type="Valuta" align="right" width="14" id="107" pattern="1" text="###.###.###,@@">
|
||||
<field x="128" y="0.5" type="Valuta" align="right" width="14" id="107" pattern="1" text="###.###.###,@@">
|
||||
<postscript description="F3.107 POSTSCRIPT">MESSAGE ADD,F2.107</postscript>
|
||||
</field>
|
||||
<field x="147" y="0.5" type="Valuta" align="right" width="14" id="108" pattern="1" text="###.###.###,@@">
|
||||
<field x="144" y="0.5" type="Valuta" align="right" width="14" id="108" pattern="1" text="###.###.###,@@">
|
||||
<postscript description="F3.108 POSTSCRIPT">MESSAGE ADD,F2.108</postscript>
|
||||
</field>
|
||||
<field x="162" y="0.5" type="Numero" align="right" width="5" id="109" pattern="1">
|
||||
<field x="159" y="0.5" type="Numero" align="right" width="5" id="109" pattern="1">
|
||||
<prescript description="F3.109 PRESCRIPT">#105 @
|
||||
0
|
||||
=
|
||||
|
46
ca/ca_3800_regole.txt
Executable file
46
ca/ca_3800_regole.txt
Executable file
@ -0,0 +1,46 @@
|
||||
Struttura base del programma
|
||||
----------------------------
|
||||
ca3800.cpp : gestione maschera, creazione report ed applicazione
|
||||
ca3801.cpp : gestione report a colonne variabili in base alla struttura del piano dei conti
|
||||
ca3883.cpp : programma vero e proprio, con tutta la parte di calcolo
|
||||
|
||||
La sequenza di calcolo è la seguente:
|
||||
1) calcolo del contributo dei saldi analitici alla data fine esercizio; tale data corrisponde alla fine dell'esercizio selezionato se specificata sulla
|
||||
maschera, oppure alla fine dell'esercizio precedente se specificata una data inferiore (bilancio alla data)
|
||||
2) calcolo del contributo (ai soli totali) dei saldi futuri; partono dell'esercizio selezionato se il campo 'alla data' è < datafine esercizio, oppure
|
||||
dall'esercizio successivo se il campo 'alla data' coincide con datafine esercizio
|
||||
Solo per il bilancio alla data:
|
||||
3) calcolo del contributo dei movimenti analitici nel periodo di calcolo dell'esercizio selezionato
|
||||
4) calcolo del contributo dei documenti non contabilizzati nello stesso periodo
|
||||
5) calcolo del contributo degli ordini non evasi nello stesso periodo
|
||||
|
||||
|
||||
Calcolo della durata della vita di una riga
|
||||
-------------------------------------------
|
||||
|
||||
1) se il movimento è di quelli con la data fine competenza = data fine commessa di ogni riga (MOVANA.AUTOFCOMP) pone la datafinecomp della riga
|
||||
= data finale della commessa sulla riga tenendo conto anche di eventuali proroghe
|
||||
|
||||
2) se invece il movimento ha datafinecomp autonoma, Viene letta la data di fine competenza in testata (MOVANA.DATAFCOMP) valida per ogni riga
|
||||
|
||||
3) se anche questa data fosse vuota -> pone la datafinecomp = datacomp (MOVANA.DATAFCOMP = MOVANA.DATACOMP) -> movimento con durata 1 giorno
|
||||
|
||||
4) se la datafinecomp < datainizio esercizio selezionato -> scarta la riga perchè è già espirata prima del periodo da calcolare
|
||||
|
||||
5) calcola la vita totale della riga = datafinecomp - datacomp + 1 (in giorni)
|
||||
|
||||
6) se vita_totale_riga > 1 giorno procede al riproporzionamento dell'importo
|
||||
|
||||
7) Calcolo della frazione di vita utile della riga
|
||||
--------------------------------------------------
|
||||
La frazione di vita utile della riga che verrà usata per il riproporzionamento degli importi è:
|
||||
|
||||
vita_frazione_riga = fine_intervallo - inizio_intervallo + 1 (in giorni)
|
||||
|
||||
dove:
|
||||
fine_intervallo = MIN(datacalcolo sulla maschera, datafinecomp)
|
||||
inizio_intervallo = MAX(data inizio esercizio selezionato, datacompetenza)
|
||||
|
||||
se (vita_frazione_riga > 1 AND < vita_totale_riga) si procede al riproporzionamento:
|
||||
|
||||
importo_riproporzionato = importo_riga * vita_frazione / vita_totale
|
Loading…
x
Reference in New Issue
Block a user