Patch level :10.0 770
Files correlati : Ricompilazione Demo : [ ] Commento : Rivisto programma ripartizione cespiti (no obbligatorietà date utilizzo e percentuali) Aggiunto il programma di stampa dei cespiti in analitica (prima stesura) git-svn-id: svn://10.65.10.50/trunk@20570 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
5cb2709c00
commit
9b5f9351b3
@ -12,9 +12,11 @@ int main(int argc,char** argv)
|
||||
case 2:
|
||||
ce4300(argc,argv); break; //stampa proiezione ammortamenti cespiti
|
||||
case 3:
|
||||
ce4400(argc,argv); break; //trasferimento movimenti cespiti in contabilita'
|
||||
ce4400(argc,argv); break; //trasferimento movimenti cespiti in contabilita' generale
|
||||
case 4:
|
||||
ce4500(argc,argv); break; //stampa cespiti in contabilità analitica
|
||||
case 0:
|
||||
default: ce4100(argc,argv) ; break; // inserimento cespiti per analitica
|
||||
default: ce4100(argc,argv) ; break; // ripartizione analitica cespiti
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
1
ce/ce4.h
1
ce/ce4.h
@ -5,6 +5,7 @@ int ce4100(int argc, char* argv[]);
|
||||
int ce4200(int argc, char* argv[]);
|
||||
int ce4300(int argc, char* argv[]);
|
||||
int ce4400(int argc, char* argv[]);
|
||||
int ce4500(int argc, char* argv[]);
|
||||
|
||||
#endif // __CE4_H
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include <automask.h>
|
||||
#include <defmask.h>
|
||||
#include <recarray.h>
|
||||
#include <relapp.h>
|
||||
|
||||
@ -24,6 +25,7 @@ class TCesp_anal_mask: public TAutomask
|
||||
_pos_dtinicms, _pos_dtfincms, _pos_dtprorcms;
|
||||
|
||||
protected:
|
||||
real check_perc_tot();
|
||||
int calc_date_cespite(TDate& dtini, TDate& dtfine);
|
||||
void calc_date_limite(const TString& codcms, TDate& dtini, TDate& dtfine);
|
||||
void calc_percutil();
|
||||
@ -73,6 +75,15 @@ TCesp_anal_mask::TCesp_anal_mask() : TAutomask ("ce4100a")
|
||||
}
|
||||
|
||||
|
||||
real TCesp_anal_mask::check_perc_tot()
|
||||
{
|
||||
TSheet_field& ss = sfield(F_RIGHE);
|
||||
real tot_perc;
|
||||
FOR_EACH_SHEET_ROW(ss,i,r)
|
||||
tot_perc += real(r->get(_pos_util));
|
||||
return tot_perc;
|
||||
}
|
||||
|
||||
int TCesp_anal_mask::calc_date_cespite(TDate& dtini, TDate& dtfine)
|
||||
{
|
||||
//si informa sulla vita del cespite
|
||||
@ -299,8 +310,6 @@ bool TCesp_anal_mask::on_field_event(TOperable_field& o, TField_event e, long jo
|
||||
|
||||
keys_list.add(row_key);
|
||||
}
|
||||
//ricalcola le percentuali !!!
|
||||
calc_percutil();
|
||||
}
|
||||
break;
|
||||
|
||||
@ -350,7 +359,7 @@ bool TCesp_anal_mask::on_field_event(TOperable_field& o, TField_event e, long jo
|
||||
const TString& codcms = o.mask().get(S_CODCMS);
|
||||
calc_date_limite(codcms, dtini, dtfine);
|
||||
const TDate dtiniuse = o.get();
|
||||
if (dtiniuse < dtini)
|
||||
if (dtiniuse.ok() && dtiniuse < dtini)
|
||||
return error_box("La data inizio uso non può essere antecedente alla data inizio commessa!");
|
||||
}
|
||||
break;
|
||||
@ -362,7 +371,7 @@ bool TCesp_anal_mask::on_field_event(TOperable_field& o, TField_event e, long jo
|
||||
const TString& codcms = o.mask().get(S_CODCMS);
|
||||
calc_date_limite(codcms, dtini, dtfine);
|
||||
const TDate dtfinuse = o.get();
|
||||
if (dtfinuse > dtfine)
|
||||
if (dtfinuse.ok() && dtfinuse > dtfine)
|
||||
return error_box("La data fine uso non può essere successiva alla data fine commessa!");
|
||||
}
|
||||
break;
|
||||
@ -379,7 +388,18 @@ bool TCesp_anal_mask::on_field_event(TOperable_field& o, TField_event e, long jo
|
||||
calc_percutil();
|
||||
}
|
||||
break;
|
||||
|
||||
case DLG_SAVEREC:
|
||||
if (e == fe_button)
|
||||
{
|
||||
const real perc_tot = check_perc_tot();
|
||||
if (perc_tot != CENTO)
|
||||
{
|
||||
const bool proseguo = yesno_box("Percentuale complessiva diversa da 100%.\nRegistrare ugualmente?");
|
||||
if (!proseguo)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -403,6 +423,7 @@ protected:
|
||||
virtual void init_query_insert_mode(TMask& m);
|
||||
virtual void init_insert_mode(TMask& m);
|
||||
virtual void init_modify_mode(TMask& m);
|
||||
virtual bool remove();
|
||||
|
||||
virtual TRelation* get_relation() const { return _rel; }
|
||||
|
||||
@ -437,6 +458,14 @@ void TCesp_anal::init_modify_mode(TMask& m)
|
||||
m.hide(-2);
|
||||
}
|
||||
|
||||
bool TCesp_anal::remove()
|
||||
{
|
||||
_rel->read(_isequal, _unlock);
|
||||
TSheet_field& sf = _msk->sfield(F_RIGHE);
|
||||
int err = sf.record()->remove();
|
||||
return err == NOERR;
|
||||
}
|
||||
|
||||
bool TCesp_anal::user_create()
|
||||
{
|
||||
_rel = new TRelation(LF_SALCECMS);
|
||||
|
@ -326,14 +326,14 @@ DATE S_DTINIUSE
|
||||
BEGIN
|
||||
PROMPT 2 6 "Inizio "
|
||||
FIELD DTINIUSE
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
DATE S_DTFINUSE
|
||||
BEGIN
|
||||
PROMPT 24 6 "Fine "
|
||||
FIELD DTFINUSE
|
||||
CHECKTYPE REQUIRED
|
||||
VALIDATE DATE_CMP_FUNC >= S_DTINIUSE
|
||||
WARNING "La data fine uso non può essere precedente alla data inizio uso!"
|
||||
END
|
||||
|
||||
NUMBER S_PERCUTIL 6 2
|
||||
@ -341,8 +341,6 @@ BEGIN
|
||||
PROMPT 2 7 "% uso "
|
||||
FLAGS "U"
|
||||
FIELD PERCUTIL
|
||||
CHECKTYPE REQUIRED
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
DATE S_DTINICMS
|
||||
|
352
ce/ce4500.cpp
Executable file
352
ce/ce4500.cpp
Executable file
@ -0,0 +1,352 @@
|
||||
#include <applicat.h>
|
||||
#include <automask.h>
|
||||
#include <defmask.h>
|
||||
#include <dongle.h>
|
||||
#include <modaut.h>
|
||||
#include <progind.h>
|
||||
#include <recarray.h>
|
||||
#include <reprint.h>
|
||||
|
||||
#include "celib.h"
|
||||
#include "ce2101.h"
|
||||
|
||||
#include "ammce.h"
|
||||
#include "ammmv.h"
|
||||
#include "cespi.h"
|
||||
#include "movam.h"
|
||||
#include "salce.h"
|
||||
#include "salcecms.h"
|
||||
|
||||
#include "ce4.h"
|
||||
#include "ce4500a.h"
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
// MASCHERA
|
||||
////////////////////////////////////////////////////////
|
||||
class TPrint_anal_cespi_mask : public TAutomask
|
||||
{
|
||||
bool _preview;
|
||||
|
||||
protected:
|
||||
bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
||||
public:
|
||||
bool preview() const { return _preview; }
|
||||
TPrint_anal_cespi_mask();
|
||||
};
|
||||
|
||||
|
||||
bool TPrint_anal_cespi_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||
{
|
||||
switch (o.dlg())
|
||||
{
|
||||
case DLG_PRINT:
|
||||
if (e == fe_button)
|
||||
_preview = false;
|
||||
break;
|
||||
case DLG_PREVIEW:
|
||||
if (e == fe_button)
|
||||
{
|
||||
_preview = true;
|
||||
stop_run(K_ENTER);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
TPrint_anal_cespi_mask::TPrint_anal_cespi_mask() : TAutomask("ce4500a"), _preview(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// RECORDSET
|
||||
///////////////////////////////////////////////////////////////
|
||||
class TPrint_anal_cespi_recordset : public TISAM_recordset
|
||||
{
|
||||
public:
|
||||
void set_filter(const TPrint_anal_cespi_mask& msk);
|
||||
TPrint_anal_cespi_recordset(const TString& sql) : TISAM_recordset(sql) { }
|
||||
};
|
||||
|
||||
|
||||
//metodo per caricare i valori nel recordset dalla maschera...fighissimo!!
|
||||
void TPrint_anal_cespi_recordset::set_filter(const TPrint_anal_cespi_mask& msk)
|
||||
{
|
||||
//magggica query
|
||||
TString query = "USE SALCECMS KEY 2";
|
||||
|
||||
query << "\nSELECT (BETWEEN(CODCDC,#CODCDC,#CODCDC))&&(BETWEEN(CODCMS,#CODCMS,#CODCMS))&&(BETWEEN(CODFASE,#CODFASE,#CODFASE))";
|
||||
|
||||
//from-to sulla key 2 di salcecms
|
||||
query << "\nFROM CODES=#CODES IDCESPITE=#IDCESPITE";
|
||||
query << "\nTO CODES=#CODES IDCESPITE=#IDCESPITE";
|
||||
|
||||
//setta la nuova query nel report (che avrebbe solo USE SALCECMS KEY 2)
|
||||
set(query);
|
||||
|
||||
//parte analitica
|
||||
const int codes = msk.get_int(F_ESERCIZIO);
|
||||
const TString& idcespite = msk.get(F_IDCESPITE);
|
||||
const TString& codcdc = msk.get(F_CODCDC);
|
||||
const TString& codcms = msk.get(F_CODCMS);
|
||||
const TString& codfase = msk.get(F_CODFASE);
|
||||
|
||||
set_var("#CODES", long(codes));
|
||||
set_var("#IDCESPITE", idcespite);
|
||||
set_var("#CODCDC", codcdc);
|
||||
set_var("#CODCMS", codcms);
|
||||
set_var("#CODFASE", codfase);
|
||||
|
||||
const TRecnotype cazzo = items();
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
// REPORT
|
||||
////////////////////////////////////////////////////////
|
||||
class TPrint_anal_cespi_rep : public TReport
|
||||
{
|
||||
int _tpamm, _codes;
|
||||
TString _codcdc, _codcms, _codfase;
|
||||
TCespite _cespite;
|
||||
|
||||
protected:
|
||||
real val_amm(const TRectype& rec_saldi) const;
|
||||
virtual bool get_usr_val(const TString& name, TVariant& var) const;
|
||||
virtual bool use_mask() { return false; }
|
||||
|
||||
public:
|
||||
void set_filter(const TPrint_anal_cespi_mask& msk);
|
||||
};
|
||||
|
||||
|
||||
void TPrint_anal_cespi_rep::set_filter(const TPrint_anal_cespi_mask& msk)
|
||||
{
|
||||
//parametri presi dalla maschera; servono solo per essere riportati sul report in quanto è..
|
||||
//..use_mask()=false; l'unico che serve per i conti è _tpamm (saldi cespite in base a _tpamm)
|
||||
_tpamm = msk.get_int(F_SITUAZIONE);
|
||||
_codcdc = msk.get(F_CODCDC);
|
||||
_codcms = msk.get(F_CODCMS);
|
||||
_codfase = msk.get(F_CODFASE);
|
||||
|
||||
TPrint_anal_cespi_recordset* rs = new TPrint_anal_cespi_recordset(EMPTY_STRING);
|
||||
set_recordset(rs);
|
||||
rs->set_filter(msk);
|
||||
}
|
||||
|
||||
real TPrint_anal_cespi_rep::val_amm(const TRectype& rec_saldi) const
|
||||
{
|
||||
real valore = rec_saldi.get_real(SALCE_CSTO);
|
||||
|
||||
if (_tpamm == 1) //solo fiscale
|
||||
valore -= rec_saldi.get_real(SALCE_VNONAMM06);
|
||||
|
||||
if (_tpamm == 2) //solo civilistico
|
||||
{
|
||||
valore -= rec_saldi.get_real(SALCE_VNONAMMC);
|
||||
valore += rec_saldi.get_real(SALCE_RIVGC);
|
||||
}
|
||||
else //fiscale e/o gestionale
|
||||
{
|
||||
valore -= rec_saldi.get_real(SALCE_VNONAMM);
|
||||
valore += rec_saldi.get_real(SALCE_RIVGF);
|
||||
}
|
||||
|
||||
valore += rec_saldi.get_real(SALCE_RIV75);
|
||||
valore += rec_saldi.get_real(SALCE_RIV83);
|
||||
valore += rec_saldi.get_real(SALCE_RIV90);
|
||||
valore += rec_saldi.get_real(SALCE_RIV91);
|
||||
|
||||
if (valore < ZERO)
|
||||
valore = ZERO;
|
||||
|
||||
return valore;
|
||||
}
|
||||
|
||||
//metodo per il calcolo dei campi da calcolare (ma va'!) nel report
|
||||
bool TPrint_anal_cespi_rep::get_usr_val(const TString& name, TVariant& var) const
|
||||
{
|
||||
const TRecordset& recset = *recordset();
|
||||
const TString& idcespite = recset.get(SALCECMS_IDCESPITE).as_string();
|
||||
const TString& desc = cache().get(LF_CESPI, idcespite, CESPI_DESC);
|
||||
const int codes = recset.get(SALCECMS_CODES).as_int();
|
||||
const TString& codcdc = recset.get(SALCECMS_CODCDC).as_string();
|
||||
const TString& codcms = recset.get(SALCECMS_CODCMS).as_string();
|
||||
const TString& codfase = recset.get(SALCECMS_CODFASE).as_string();
|
||||
const real percutil = recset.get(SALCECMS_PERCUTIL).as_real() / CENTO;
|
||||
|
||||
if (idcespite != _cespite.get(CESPI_IDCESPITE))
|
||||
{
|
||||
TCespite& c = (TCespite&)_cespite;
|
||||
c.read(idcespite);
|
||||
c.load_saldi(_tpamm, codes);
|
||||
}
|
||||
|
||||
//CAMPI CESPITE
|
||||
//-------------
|
||||
if (name.starts_with("#DESC"))
|
||||
{
|
||||
var = desc;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (name.starts_with("#VARIAZIONE")) //variazione del valore annuale (saldo finale - saldo iniziale)
|
||||
{
|
||||
const real val_fin = val_amm(_cespite.sal_pro());
|
||||
const real val_ini = val_amm(_cespite.sal_ini());
|
||||
var = (val_fin - val_ini) * percutil;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (name == "#QAMMMV") //quote ammortamento su movimento esercizio corrente
|
||||
{
|
||||
real quote_ammmv;
|
||||
const TArray& array_ammmv = _cespite.ammmv();
|
||||
for (int i = 0; i < array_ammmv.items(); i++)
|
||||
{
|
||||
const TRectype& rec_ammmv = (const TRectype&)array_ammmv[i];
|
||||
quote_ammmv += rec_ammmv.get_real(AMMMV_QNOR) + rec_ammmv.get_real(AMMMV_QACC) +
|
||||
rec_ammmv.get_real(AMMMV_QANT) + rec_ammmv.get_real(AMMMV_QPERSE) +
|
||||
rec_ammmv.get_real(AMMMV_QPPRIVATE) + rec_ammmv.get_real(AMMMV_FPRIVATO);
|
||||
}
|
||||
quote_ammmv *= percutil;
|
||||
var = quote_ammmv;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (name == "#QAMM") //quote ammortamento esercizio corrente
|
||||
{
|
||||
const TRectype& rec_ammce = _cespite.amm_pro();
|
||||
real quote_amm = real(rec_ammce.get_real(AMMCE_QNOR) + rec_ammce.get_real(AMMCE_QACC) +
|
||||
rec_ammce.get_real(AMMCE_QANT) + rec_ammce.get_real(AMMCE_QPERSE) +
|
||||
rec_ammce.get_real(AMMCE_QPPRIVATE) + rec_ammce.get_real(AMMCE_FPRIVATO));
|
||||
quote_amm *= percutil;
|
||||
var = quote_amm;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (name == "#QAMM_FPRIVATO") //fondo ammortamento privato corrente
|
||||
{
|
||||
const TRectype& rec_ammce = _cespite.amm_pro();
|
||||
real famm = rec_ammce.get_real(AMMCE_FPRIVATO);
|
||||
famm *= percutil;
|
||||
var = famm;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (name == "#PERCAMM") // percentuale ammortamento
|
||||
{
|
||||
real percamm;
|
||||
real valamm = val_amm(_cespite.sal_ini());
|
||||
if (valamm.is_zero()) // Non riesce a calcolare il valore ammortizzabile dei cespiti nuovi
|
||||
{
|
||||
const int anno_acq = _cespite.get_date(CESPI_DTCOMP).year();
|
||||
if (anno_acq == codes)
|
||||
{
|
||||
valamm = val_amm(_cespite.sal_pro());
|
||||
}
|
||||
}
|
||||
if (!valamm.is_zero())
|
||||
{
|
||||
TVariant qamm, qammmv;
|
||||
get_usr_val("#QAMM", qamm);
|
||||
get_usr_val("#QAMMMV", qammmv);
|
||||
percamm = CENTO * (qamm.as_real() + qammmv.as_real()) / valamm;
|
||||
percamm.round(1);
|
||||
}
|
||||
var = percamm;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (name == "#CESSELIM") //cessioni elminiazioni
|
||||
{
|
||||
real cesselim;
|
||||
const TArray& array_movam = _cespite.movam();
|
||||
for (int i = 0; i < array_movam.items(); i++)
|
||||
{
|
||||
const TRectype& rec_movam = (const TRectype&)array_movam[i];
|
||||
cesselim += rec_movam.get_real(MOVAM_QNOR) + rec_movam.get_real(MOVAM_QACC) +
|
||||
rec_movam.get_real(MOVAM_QANT) + rec_movam.get_real(MOVAM_QPERSE) +
|
||||
rec_movam.get_real(MOVAM_QPPRIVATE) + rec_movam.get_real(MOVAM_FPRIVATO);
|
||||
}
|
||||
cesselim *= percutil;
|
||||
var = cesselim;
|
||||
return true;
|
||||
}
|
||||
|
||||
//CAMPI TESTATA (FILTRI)
|
||||
//----------------------
|
||||
if (name == "#CODCDC")
|
||||
{
|
||||
var.set(_codcdc);
|
||||
return true;
|
||||
}
|
||||
if (name == "#CODCMS")
|
||||
{
|
||||
var.set(_codcms);
|
||||
return true;
|
||||
}
|
||||
if (name == "#CODFASE")
|
||||
{
|
||||
var.set(_codfase);
|
||||
return true;
|
||||
}
|
||||
if (name == "#SITUAZIONE") //tipo situazione da stampare in testata
|
||||
{
|
||||
var.set(_tpamm);
|
||||
return true;
|
||||
}
|
||||
|
||||
return TReport::get_usr_val(name, var);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
// APPLICAZIONE
|
||||
////////////////////////////////////////////////////////
|
||||
class TPrint_anal_cespi : public TSkeleton_application
|
||||
{
|
||||
protected:
|
||||
virtual bool create(void);
|
||||
virtual void main_loop();
|
||||
};
|
||||
|
||||
void TPrint_anal_cespi::main_loop()
|
||||
{
|
||||
TPrint_anal_cespi_mask mask;
|
||||
while (mask.run() == K_ENTER)
|
||||
{
|
||||
//report e book dei report
|
||||
TReport_book book;
|
||||
TPrint_anal_cespi_rep rep;
|
||||
rep.load("ce4500a");
|
||||
|
||||
rep.set_filter(mask);
|
||||
book.add(rep);
|
||||
|
||||
//stampa il book dei report
|
||||
if (mask.preview())
|
||||
book.preview();
|
||||
else
|
||||
book.print();
|
||||
}
|
||||
}
|
||||
|
||||
bool TPrint_anal_cespi::create()
|
||||
{
|
||||
const bool has_ca = dongle().active(CAAUT);
|
||||
//se la chiave non ha CA non si può proseguire!
|
||||
if (!has_ca)
|
||||
return error_box("Per utilizzare questo programma è necessaria l'attivazione del modulo Contabiltà Analitica");
|
||||
|
||||
return TSkeleton_application::create();
|
||||
}
|
||||
|
||||
int ce4500(int argc, char* argv[])
|
||||
{
|
||||
TPrint_anal_cespi a;
|
||||
a.run(argc, argv, TR("Stampa cespiti per analitica"));
|
||||
return 0;
|
||||
}
|
18
ce/ce4500a.h
Executable file
18
ce/ce4500a.h
Executable file
@ -0,0 +1,18 @@
|
||||
//campi maschera ce4500a.uml
|
||||
#define F_CODDITTA 101
|
||||
#define F_RAGSOC 102
|
||||
#define F_ESERCIZIO 103
|
||||
#define F_DATAINIZIO 104
|
||||
#define F_DATAFINE 105
|
||||
#define F_IDCESPITE 106
|
||||
#define F_DESC 107
|
||||
#define F_SITUAZIONE 108
|
||||
|
||||
#define F_CODCMS 120
|
||||
#define F_DESCMS 121
|
||||
#define F_CODFASE 122
|
||||
#define F_DESFASE 123
|
||||
#define F_CODCDC 124
|
||||
#define F_DESCDC 125
|
||||
|
||||
#define F_REPORT 126
|
143
ce/ce4500a.rep
Executable file
143
ce/ce4500a.rep
Executable file
@ -0,0 +1,143 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<report name="ce4500a" orientation="1" lpi="6">
|
||||
<description>Cespiti in analitica</description>
|
||||
<font face="Arial Narrow" size="8" />
|
||||
<section type="Head" pattern="1">
|
||||
<font face="Arial Narrow" bold="1" size="8" />
|
||||
<field border="1" x="1" type="Linea" width="117" height="0" pattern="1" />
|
||||
<field x="97" y="0.5" type="Testo" align="center" width="20" pattern="1" text="Fondo Ammortamento" />
|
||||
<field x="1" y="1.5" type="Testo" width="10" pattern="1" text="Cespite" />
|
||||
<field x="34" y="1.5" type="Testo" width="15" pattern="1" text="Centro di costo" />
|
||||
<field x="49" y="1.5" type="Testo" width="15" pattern="1" text="Commessa" />
|
||||
<field x="64" y="1.5" type="Testo" width="5" pattern="1" text="Fase" />
|
||||
<field x="72" y="1.5" type="Testo" align="right" width="12" pattern="1" text="Variazione" />
|
||||
<field x="84.5" y="1.5" type="Testo" align="right" width="6" pattern="1" text="%Amm" />
|
||||
<field x="91.5" y="1.5" type="Testo" align="right" width="12" pattern="1" text="Es. corr." />
|
||||
<field x="104" y="1.5" type="Testo" align="right" width="12" pattern="1" text="Cessioni" />
|
||||
<field border="1" x="1" y="2.5" type="Linea" width="117" height="0" pattern="1" />
|
||||
</section>
|
||||
<section type="Head" level="1" pattern="1">
|
||||
<font italic="1" face="Arial" size="8" />
|
||||
<prescript description="H1 PRESCRIPT">MESSAGE RESET,F1.103
|
||||
MESSAGE RESET,F1.102
|
||||
MESSAGE RESET,F1.101
|
||||
MESSAGE RESET,F1.104
|
||||
MESSAGE RESET,F1.105
|
||||
MESSAGE RESET,F1.106
|
||||
MESSAGE RESET,F1.107</prescript>
|
||||
<field border="1" radius="100" x="12" y="0.5" type="Testo" valign="center" align="center" shade_offset="25" width="96" height="2.5" pattern="2" text="CESPITI IN ANALITICA">
|
||||
<font face="Times New Roman" bold="1" size="16" />
|
||||
</field>
|
||||
<field border="2" x="1" y="4" type="Linea" width="117" height="0" pattern="1" />
|
||||
<field x="1" y="4.5" type="Testo" width="10" pattern="1" text="Ditta:" />
|
||||
<field x="11" y="4.5" type="Stringa" width="50" pattern="1">
|
||||
<font italic="1" face="Arial" bold="1" size="8" />
|
||||
<source>#SYSTEM.RAGSOC</source>
|
||||
</field>
|
||||
<field x="93" y="4.5" type="Testo" width="14" pattern="1" text="Data stampa:" />
|
||||
<field x="107" y="4.5" type="Data" width="11" pattern="1">
|
||||
<font italic="1" face="Arial" bold="1" size="8" />
|
||||
<source>#SYSTEM.DATE</source>
|
||||
</field>
|
||||
<field x="3" y="6.25" type="Testo" bg_color="#000000" txt_color="#FFFFFF" width="18" pattern="2" text="Parametri di stampa">
|
||||
<font italic="1" face="Arial" bold="1" size="8" />
|
||||
</field>
|
||||
<field x="1" y="7.5" type="Testo" width="7" pattern="1" text="Anno:" />
|
||||
<field x="8" y="7.5" type="Numero" align="right" width="5" pattern="1">
|
||||
<font italic="1" face="Arial" bold="1" size="8" />
|
||||
<source>CODES</source>
|
||||
</field>
|
||||
<field x="38" y="7.5" type="Testo" width="12" pattern="1" text="Centro di costo:" />
|
||||
<field x="52" y="7.5" type="Stringa" width="15" pattern="1">
|
||||
<font face="Arial" bold="1" size="8" />
|
||||
<source>#CODCDC</source>
|
||||
</field>
|
||||
<field x="68" y="7.5" type="Stringa" width="50" pattern="1">
|
||||
<font italic="1" face="Arial Narrow" size="8" />
|
||||
<prescript description="H1.0 PRESCRIPT">MESSAGE ISAMREAD,CDC,CODCOSTO=#CODCDC,DESCRIZ</prescript>
|
||||
</field>
|
||||
<field x="1" y="8.5" type="Array" width="25" pattern="1">
|
||||
<font italic="1" face="Arial" bold="1" size="8" />
|
||||
<source>#SITUAZIONE</source>
|
||||
<list>
|
||||
<li Value="Situazione Fiscale" Code="1" />
|
||||
<li Value="Situazione Civilistica" Code="2" />
|
||||
<li Value="Situazione Gestionale" Code="3" />
|
||||
</list>
|
||||
</field>
|
||||
<field x="38" y="8.5" type="Testo" width="10" pattern="1" text="Commessa:" />
|
||||
<field x="52" y="8.5" type="Stringa" width="15" pattern="1">
|
||||
<font face="Arial" bold="1" size="8" />
|
||||
<source>#CODCMS</source>
|
||||
</field>
|
||||
<field x="68" y="8.5" type="Stringa" width="50" pattern="1">
|
||||
<font italic="1" face="Arial Narrow" size="8" />
|
||||
<prescript description="H1.0 PRESCRIPT">MESSAGE ISAMREAD,COMMESSE,CODCMS=#CODCMS,DESCRIZ</prescript>
|
||||
</field>
|
||||
<field x="38" y="9.5" type="Testo" width="10" pattern="1" text="Fase:" />
|
||||
<field x="52" y="9.5" type="Stringa" width="15" pattern="1">
|
||||
<font face="Arial" bold="1" size="8" />
|
||||
<source>#CODFASE</source>
|
||||
</field>
|
||||
<field x="68" y="9.5" type="Stringa" width="50" pattern="1">
|
||||
<font italic="1" face="Arial Narrow" size="8" />
|
||||
<prescript description="H1.0 PRESCRIPT">MESSAGE ISAMREAD,FASI,CODCMSFAS=#CODCMS!CODFASE=#CODFASE,DESCRIZ</prescript>
|
||||
</field>
|
||||
</section>
|
||||
<section type="Body" pattern="1" />
|
||||
<section type="Body" level="1" pattern="1">
|
||||
<field x="1" type="Stringa" width="8" pattern="1">
|
||||
<source>IDCESPITE</source>
|
||||
</field>
|
||||
<field x="9" type="Stringa" dynamic_height="1" width="25" height="2" pattern="1">
|
||||
<font face="Arial Narrow" size="7" />
|
||||
<source>#DESC</source>
|
||||
</field>
|
||||
<field x="34" type="Stringa" width="15" pattern="1">
|
||||
<source>CODCDC</source>
|
||||
</field>
|
||||
<field x="49" type="Stringa" width="15" pattern="1">
|
||||
<source>CODCMS</source>
|
||||
</field>
|
||||
<field x="64" type="Stringa" width="8" pattern="1">
|
||||
<source>CODFASE</source>
|
||||
</field>
|
||||
<field x="72" type="Valuta" align="right" width="12" id="103" pattern="1" text="#########,@@">
|
||||
<source>#VARIAZIONE</source>
|
||||
<postscript description="B1.103 POSTSCRIPT">MESSAGE ADD,F1.103
|
||||
</postscript>
|
||||
</field>
|
||||
<field x="84.5" type="Numero" align="right" width="6" id="104" pattern="1" text="##@,@@">
|
||||
<source>#PERCAMM</source>
|
||||
</field>
|
||||
<field x="91.5" type="Valuta" align="right" width="12" id="105" pattern="1" text="#########,@@">
|
||||
<source>#QAMM+#QAMMMV</source>
|
||||
<postscript description="B1.105 POSTSCRIPT">MESSAGE ADD,F1.105
|
||||
</postscript>
|
||||
</field>
|
||||
<field x="104" type="Valuta" align="right" width="12" id="106" pattern="1" text="#########,@@">
|
||||
<source>#CESSELIM+#QAMMMV</source>
|
||||
<postscript description="B1.106 POSTSCRIPT">MESSAGE ADD,F1.106
|
||||
</postscript>
|
||||
</field>
|
||||
</section>
|
||||
<section type="Foot" pattern="1">
|
||||
<font face="Arial" size="8" />
|
||||
<field border="1" x="1" type="Linea" width="117" height="0" pattern="1" />
|
||||
<field x="101" y="0.25" type="Testo" width="5" pattern="1" text="Pag." />
|
||||
<field x="107" y="0.25" type="Numero" align="right" width="3" pattern="1">
|
||||
<source>#REPORT.PAGE</source>
|
||||
</field>
|
||||
</section>
|
||||
<section type="Foot" level="1" bg_color="#000000" height="1.5" pattern="1">
|
||||
<font face="Arial Narrow" bold="1" size="8" />
|
||||
<field border="2" x="1" y="0.25" type="Linea" txt_color="#FFFFFF" width="117" height="0" pattern="1" />
|
||||
<field x="58" y="0.5" type="Testo" width="10" pattern="1" text="Totali" />
|
||||
<field x="72" y="0.5" type="Valuta" align="right" width="12" id="103" pattern="1" text="#########,@@" />
|
||||
<field x="91.5" y="0.5" type="Valuta" align="right" width="12" id="105" pattern="1" text="#########,@@" />
|
||||
<field x="104" y="0.5" type="Valuta" align="right" width="12" id="106" pattern="1" text="#########,@@" />
|
||||
</section>
|
||||
<sql>USE SALCECMS KEY 2
|
||||
FROM CODES=#CODES IDCESPITE=#IDCESPITE
|
||||
TO CODES=#CODES IDCESPITE=#IDCESPITE</sql>
|
||||
</report>
|
165
ce/ce4500a.uml
Executable file
165
ce/ce4500a.uml
Executable file
@ -0,0 +1,165 @@
|
||||
#include "ce4500a.h"
|
||||
|
||||
TOOLBAR "topbar" 0 0 0 2
|
||||
#include <aprintbar.h>
|
||||
ENDPAGE
|
||||
|
||||
PAGE "Cespiti in analitica" 0 2 0 0
|
||||
|
||||
GROUPBOX DLG_NULL 78 4
|
||||
BEGIN
|
||||
PROMPT 1 1 ""
|
||||
END
|
||||
|
||||
NUMBER F_CODDITTA 5
|
||||
BEGIN
|
||||
PROMPT 2 2 "Ditta "
|
||||
FLAGS "DF"
|
||||
USE LF_NDITTE
|
||||
INPUT CODDITTA F_CODDITTA
|
||||
OUTPUT F_RAGSOC RAGSOC
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
STRING F_RAGSOC 55
|
||||
BEGIN
|
||||
PROMPT 20 2 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
NUMBER F_ESERCIZIO 4
|
||||
BEGIN
|
||||
PROMPT 2 3 "Esercizio "
|
||||
FLAGS "Z"
|
||||
USE CCE
|
||||
JOIN ESC ALIAS 105 INTO CODTAB==CODTAB
|
||||
INPUT CODTAB F_ESERCIZIO
|
||||
DISPLAY "Codice esercizio" CODTAB
|
||||
DISPLAY "Data inizio@15" 105@->D0
|
||||
DISPLAY "Data fine@15" 105@->D1
|
||||
OUTPUT F_ESERCIZIO CODTAB
|
||||
OUTPUT F_DATAINIZIO 105@->D0
|
||||
OUTPUT F_DATAFINE 105@->D1
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
DATE F_DATAINIZIO
|
||||
BEGIN
|
||||
PROMPT 20 3 "Data inizio "
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
DATE F_DATAFINE
|
||||
BEGIN
|
||||
PROMPT 45 3 "Data fine "
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
STRING F_IDCESPITE 10
|
||||
BEGIN
|
||||
PROMPT 2 5 "Cespite "
|
||||
FLAGS "UZ"
|
||||
USE LF_SALCECMS KEY 2 SELECT NRIGA==1
|
||||
JOIN LF_CESPI INTO IDCESPITE==IDCESPITE
|
||||
INPUT CODES F_ESERCIZIO SELECT
|
||||
INPUT IDCESPITE F_IDCESPITE
|
||||
DISPLAY "Esercizio" CODES
|
||||
DISPLAY "Codice@10" IDCESPITE
|
||||
DISPLAY "Descrizione@50" LF_CESPI->DESC
|
||||
DISPLAY "Cat." LF_CESPI->CODCAT
|
||||
DISPLAY "Data Acq.@10" LF_CESPI->DTCOMP
|
||||
DISPLAY "Data Ali.@10" LF_CESPI->DTALIEN
|
||||
OUTPUT F_ESERCIZIO CODES
|
||||
OUTPUT F_IDCESPITE IDCESPITE
|
||||
OUTPUT F_DESC LF_CESPI->DESC
|
||||
CHECKTYPE SEARCH
|
||||
END
|
||||
|
||||
STRING F_DESC 60 50
|
||||
BEGIN
|
||||
PROMPT 25 5 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
RADIOBUTTON F_SITUAZIONE 78
|
||||
BEGIN
|
||||
PROMPT 1 6 "@bSituazione"
|
||||
ITEM "1|Fiscale"
|
||||
ITEM "2|Civilistica"
|
||||
ITEM "3|Gestionale"
|
||||
FLAGS "Z"
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 78 5
|
||||
BEGIN
|
||||
PROMPT 1 9 "@bAnalitica"
|
||||
END
|
||||
|
||||
STRING F_CODCMS 20
|
||||
BEGIN
|
||||
PROMPT 2 10 "Commessa "
|
||||
USE LF_COMMESSE
|
||||
INPUT CODCMS F_CODCMS
|
||||
DISPLAY "Codice@20" CODCMS
|
||||
DISPLAY "Descrizione@50" DESCRIZ
|
||||
OUTPUT F_CODCMS CODCMS
|
||||
OUTPUT F_DESCMS DESCRIZ
|
||||
CHECKTYPE NORMAL
|
||||
|
||||
END
|
||||
|
||||
STRING F_DESCMS 50 39
|
||||
BEGIN
|
||||
PROMPT 36 10 ""
|
||||
USE LF_COMMESSE KEY 2
|
||||
INPUT DESCRIZ F_DESCMS
|
||||
DISPLAY "Descrizione@50" DESCRIZ
|
||||
DISPLAY "Codice@20" CODCMS
|
||||
COPY OUTPUT F_CODCMS
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
STRING F_CODFASE 10
|
||||
BEGIN
|
||||
PROMPT 2 11 "Fase "
|
||||
USE LF_FASI
|
||||
INPUT CODCMSFAS F_CODCMS SELECT
|
||||
INPUT CODFASE F_CODFASE
|
||||
DISPLAY "Fase@10" CODFASE
|
||||
DISPLAY "Descrizione@50" DESCRIZ
|
||||
OUTPUT F_CODFASE CODFASE
|
||||
OUTPUT F_DESFASE DESCRIZ
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
STRING F_DESFASE 50 39
|
||||
BEGIN
|
||||
PROMPT 36 11 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
STRING F_CODCDC 20
|
||||
BEGIN
|
||||
PROMPT 2 12 "C. costo "
|
||||
USE LF_CDC
|
||||
INPUT CODCOSTO F_CODCDC
|
||||
DISPLAY "Codice@20" CODCOSTO
|
||||
DISPLAY "Descrizione@50" DESCRIZ
|
||||
OUTPUT F_CODCDC CODCOSTO
|
||||
OUTPUT F_DESCDC DESCRIZ
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
STRING F_DESCDC 50 39
|
||||
BEGIN
|
||||
PROMPT 36 12 ""
|
||||
USE LF_CDC KEY 2
|
||||
INPUT DESCRIZ F_DESCDC
|
||||
DISPLAY "Descrizione@50" DESCRIZ
|
||||
DISPLAY "Codice@20" CODCOSTO
|
||||
COPY OUTPUT F_CODCDC
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
Loading…
x
Reference in New Issue
Block a user