Patch level :10.0
Files correlati : Ricompilazione Demo : [ ] Commento : stampa assurda per SMaryOfAngels fine fase 2 (prg stampa, da controllare valori) git-svn-id: svn://10.65.10.50/trunk@19750 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
a487e12bc3
commit
ab0ef19bd3
129
ca/ca1800.cpp
129
ca/ca1800.cpp
@ -1,6 +1,8 @@
|
||||
#include <applicat.h>
|
||||
#include <automask.h>
|
||||
#include <defmask.h>
|
||||
#include <dongle.h>
|
||||
#include <modaut.h>
|
||||
#include <progind.h>
|
||||
#include <recset.h>
|
||||
#include <reprint.h>
|
||||
@ -8,6 +10,7 @@
|
||||
#include <utility.h>
|
||||
|
||||
#include "rmovana.h"
|
||||
#include "calib01.h"
|
||||
#include "calib02.h"
|
||||
#include "ca1800a.h"
|
||||
|
||||
@ -54,10 +57,10 @@ bool TPrint_contixcms_mask::on_field_event(TOperable_field& o, TField_event e, l
|
||||
////////////////////////////////////////////////////////
|
||||
// REPORT
|
||||
////////////////////////////////////////////////////////
|
||||
class TPrint_contixcms_report : public TReport
|
||||
class TPrint_contixcms_report : public TAnal_report
|
||||
{
|
||||
protected:
|
||||
//virtual bool use_mask() { return false; } //questo ci vuole quando la maschera ha un nome != dai report
|
||||
virtual bool use_mask() { return false; }
|
||||
public:
|
||||
TPrint_contixcms_report() {}
|
||||
};
|
||||
@ -69,7 +72,7 @@ public:
|
||||
class TPrint_contixcms_recordset : public TAS400_recordset
|
||||
{
|
||||
protected:
|
||||
long trova_riga(const TToken_string& key);
|
||||
long trova_riga(const TString& key);
|
||||
|
||||
public:
|
||||
bool aggiungi_riga(TISAM_recordset& recset);
|
||||
@ -89,20 +92,22 @@ TPrint_contixcms_recordset::TPrint_contixcms_recordset()
|
||||
}
|
||||
|
||||
//cerca se una riga con chiave key esiste già
|
||||
long TPrint_contixcms_recordset::trova_riga(const TToken_string& key)
|
||||
long TPrint_contixcms_recordset::trova_riga(const TString& key)
|
||||
{
|
||||
long first = 0;
|
||||
long last = items() - 1;
|
||||
long riga = -1;
|
||||
|
||||
TString80 guess_key;
|
||||
|
||||
while(first <= last)
|
||||
{
|
||||
const long guess = (first + last) / 2;
|
||||
move_to(guess);
|
||||
|
||||
TToken_string guess_key;
|
||||
guess_key.add(get(RMOVANA_CODCMS).as_string()); //commessa
|
||||
guess_key.add(get(RMOVANA_CODCONTO).as_string()); //conto
|
||||
guess_key = get(RMOVANA_CODCMS).as_string(); //commessa
|
||||
guess_key.left_just(20);
|
||||
guess_key << get(RMOVANA_CODCONTO).as_string(); //conto
|
||||
|
||||
const int diff = guess_key.compare(key);
|
||||
if (diff == 0)
|
||||
@ -156,51 +161,55 @@ bool TPrint_contixcms_recordset::aggiungi_riga(TISAM_recordset& recset)
|
||||
const TString& codconto = recset.get(RMOVANA_CODCONTO).as_string();
|
||||
TAnal_bill zio(codconto);
|
||||
const TIndbil ib = zio.indicatore_bilancio();
|
||||
const TDate& datacomp = recset.get(RMOVANA_DATACOMP).as_date();
|
||||
const real curr_valore = recset.get(RMOVANA_IMPORTO).as_real();
|
||||
const char curr_sezione = recset.get(RMOVANA_SEZIONE).as_string()[0];
|
||||
TImporto curr_imp(curr_sezione, curr_valore); //importo riga correntemente in esame
|
||||
|
||||
//chiave della riga (solo su commessa e conto!; la fase è solo un filtro in input)
|
||||
TToken_string key;
|
||||
key.add(codcms);
|
||||
key.add(codconto);
|
||||
|
||||
//cerca se per caso la riga non esista già con questa chiave
|
||||
long numriga = trova_riga(key);
|
||||
|
||||
//se la riga con la chiave key non esiste nel printrecordset la aggiunge
|
||||
if (numriga < 0)
|
||||
//solo i conti di tipo costo/ricavo possono essere considerati (no attività/passività o non definiti)
|
||||
if (ib == ib_costi || ib == ib_ricavi)
|
||||
{
|
||||
new_rec("");
|
||||
set(RMOVANA_CODCMS, TVariant(codcms));
|
||||
set(RMOVANA_CODFASE, TVariant(codfase));
|
||||
set(RMOVANA_CODCONTO, TVariant(codconto));
|
||||
set("INDBIL", TVariant(long(ib)));
|
||||
set(RMOVANA_DATACOMP, TVariant(datacomp));
|
||||
const TDate& datacomp = recset.get(RMOVANA_DATACOMP).as_date();
|
||||
const real curr_valore = recset.get(RMOVANA_IMPORTO).as_real();
|
||||
const char curr_sezione = recset.get(RMOVANA_SEZIONE).as_string()[0];
|
||||
TImporto curr_imp(curr_sezione, curr_valore); //importo riga correntemente in esame
|
||||
|
||||
//deve ordinare il recordset
|
||||
sort(compare_cms_conto);
|
||||
//chiave della riga (solo su commessa e conto!; la fase è solo un filtro in input)
|
||||
TString80 key;
|
||||
key = codcms;
|
||||
key.left_just(20);
|
||||
key << codconto;
|
||||
|
||||
//dopo che la riga è stata aggiunta riesegue la trova_riga in modo da ottenere il numero di riga
|
||||
numriga = trova_riga(key);
|
||||
//cerca se per caso la riga non esista già con questa chiave
|
||||
long numriga = trova_riga(key);
|
||||
|
||||
//se la riga con la chiave key non esiste nel printrecordset la aggiunge
|
||||
if (numriga < 0)
|
||||
{
|
||||
new_rec("");
|
||||
set(RMOVANA_CODCMS, TVariant(codcms));
|
||||
set(RMOVANA_CODFASE, TVariant(codfase));
|
||||
set(RMOVANA_CODCONTO, TVariant(codconto));
|
||||
set("INDBIL", TVariant(long(ib)));
|
||||
set(RMOVANA_DATACOMP, TVariant(datacomp));
|
||||
|
||||
//deve ordinare il recordset
|
||||
sort(compare_cms_conto);
|
||||
|
||||
//dopo che la riga è stata aggiunta riesegue la trova_riga in modo da ottenere il numero di riga
|
||||
numriga = trova_riga(key);
|
||||
}
|
||||
|
||||
//importo riga con indice numriga
|
||||
const char tot_sezione = get(RMOVANA_SEZIONE).as_string()[0];
|
||||
const real tot_valore = get(RMOVANA_IMPORTO).as_real();
|
||||
TImporto tot_imp(tot_sezione, tot_valore);
|
||||
|
||||
//aggiunge l'importo alla riga (nuova o vecchia)
|
||||
tot_imp += curr_imp;
|
||||
|
||||
//normalizza e risalva il valore aggiornato sulla riga
|
||||
tot_imp.normalize();
|
||||
TString4 str_sez;
|
||||
str_sez << tot_imp.sezione();
|
||||
set(RMOVANA_SEZIONE, str_sez);
|
||||
set(RMOVANA_IMPORTO, tot_imp.valore());
|
||||
}
|
||||
|
||||
//importo riga con indice numriga
|
||||
const char tot_sezione = get(RMOVANA_SEZIONE).as_string()[0];
|
||||
const real tot_valore = get(RMOVANA_IMPORTO).as_real();
|
||||
TImporto tot_imp(tot_sezione, tot_valore);
|
||||
|
||||
//aggiunge l'importo alla riga (nuova o vecchia)
|
||||
tot_imp += curr_imp;
|
||||
|
||||
//normalizza e risalva il valore aggiornato sulla riga
|
||||
tot_imp.normalize();
|
||||
TString4 str_sez;
|
||||
str_sez << tot_imp.sezione();
|
||||
set(RMOVANA_SEZIONE, str_sez);
|
||||
set(RMOVANA_IMPORTO, tot_imp.valore());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -302,8 +311,6 @@ void TPrint_contixcms::print_or_preview(const bool stampa)
|
||||
|
||||
TPrint_contixcms_report rep;
|
||||
rep.load(rep_name);
|
||||
|
||||
rep.mask2report(*_mask); //setta i valori della maschera sul report
|
||||
|
||||
//metodo per la generazione del recordset che contiene tutti i dati da stampare
|
||||
//insomma, il vero programma!
|
||||
@ -312,8 +319,17 @@ void TPrint_contixcms::print_or_preview(const bool stampa)
|
||||
//appioppa il recordset al report
|
||||
rep.set_recordset(printset);
|
||||
|
||||
//setta i valori della maschera sul report (dopo la set_recordset, sennò..
|
||||
//..sarebbero sovrascritti dalla set_recordset)
|
||||
rep.mask2report(*_mask);
|
||||
|
||||
//se l'utonto vuole il dettaglio sottocontesco
|
||||
if (_mask->get_bool(F_HIDESOTT))
|
||||
rep.section('B', 1).hide();
|
||||
|
||||
TReport_book book;
|
||||
book.add(rep);
|
||||
|
||||
if (stampa)
|
||||
book.print();
|
||||
else
|
||||
@ -341,6 +357,19 @@ void TPrint_contixcms::main_loop()
|
||||
|
||||
bool TPrint_contixcms::create()
|
||||
{
|
||||
//controlla se la chiave ha il modulo CA (e non solo CM)
|
||||
const bool has_ca = dongle().active(CAAUT);
|
||||
//in tal caso il programma è utilizzabile solo se si ha il piano dei conti contabile..
|
||||
//..e le fasi non legate alle commesse
|
||||
if (has_ca)
|
||||
{
|
||||
TConfig& cfg = ca_config();
|
||||
const bool usepdcc = cfg.get_bool("UsePdcc");
|
||||
const TString& fath_fasi = cfg.get("FathFasi");
|
||||
if (!usepdcc || fath_fasi == "CMS")
|
||||
return false;
|
||||
}
|
||||
|
||||
return TSkeleton_application::create();
|
||||
}
|
||||
|
||||
|
35
ca/ca1800a.h
35
ca/ca1800a.h
@ -5,22 +5,27 @@
|
||||
#define F_ANNO 103
|
||||
#define F_DATAINI 104
|
||||
#define F_DATAFIN 105
|
||||
|
||||
#define F_DACODCMS 106
|
||||
#define F_ACODCMS 107
|
||||
#define F_DACODFASE 108
|
||||
#define F_ACODFASE 109
|
||||
#define F_GRUPPOINI 110
|
||||
#define F_CONTOINI 111
|
||||
#define F_SOTTOCINI 112
|
||||
#define F_DESCRINI 113
|
||||
#define F_GRUPPOFIN 114
|
||||
#define F_CONTOFIN 115
|
||||
#define F_SOTTOCFIN 116
|
||||
#define F_DESCRFIN 117
|
||||
#define F_DADESCMS 107
|
||||
#define F_ACODCMS 108
|
||||
#define F_ADESCMS 109
|
||||
|
||||
#define F_DETTAGLI 120
|
||||
#define F_TOTCONTI 121
|
||||
#define F_TOTCMS 122
|
||||
#define F_DACODFASE 110
|
||||
#define F_DADESFASE 111
|
||||
#define F_ACODFASE 112
|
||||
#define F_ADESFASE 113
|
||||
|
||||
#define F_REPORT 123
|
||||
#define F_GRUPPOINI 115
|
||||
#define F_CONTOINI 116
|
||||
#define F_SOTTOCINI 117
|
||||
#define F_DESCRINI 118
|
||||
#define F_GRUPPOFIN 120
|
||||
#define F_CONTOFIN 121
|
||||
#define F_SOTTOCFIN 122
|
||||
#define F_DESCRFIN 123
|
||||
|
||||
#define F_HIDESOTT 125
|
||||
|
||||
#define F_REPORT 126
|
||||
|
||||
|
403
ca/ca1800a.rep
403
ca/ca1800a.rep
@ -1,14 +1,399 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<report name="ca1800a" orientation="2" lpi="6">
|
||||
<report name="ca1800a" orientation="1" lpi="6">
|
||||
<description>Stampa conti per commessa (analitica CM)</description>
|
||||
<font face="Arial" size="8" />
|
||||
<section type="Head" />
|
||||
<section type="Head" level="1" />
|
||||
<section type="Body" />
|
||||
<section type="Body" level="1">
|
||||
<field x="1" type="Stringa" width="20" pattern="1">
|
||||
<source>CODCONTO</source>
|
||||
<section type="Head">
|
||||
<font face="Arial" bold="1" size="8" />
|
||||
<field x="1" y="0.5" type="Testo" width="12" pattern="1" text="Commessa" />
|
||||
<field border="1" x="83.5" y="1" type="Linea" height="1.5" pattern="1" />
|
||||
<field x="3" y="1.5" type="Testo" width="10" pattern="1" text="Conto" />
|
||||
<field x="70" y="1.5" type="Testo" align="center" width="10" pattern="1" text="COSTI" />
|
||||
<field x="86" y="1.5" type="Testo" align="center" width="10" pattern="1" text="RICAVI" />
|
||||
<field border="1" x="1" y="2.5" type="Linea" width="100" height="0" pattern="1" />
|
||||
</section>
|
||||
<section type="Head" level="1">
|
||||
<font face="Arial" bold="1" size="8" />
|
||||
<prescript description="H1 PRESCRIPT">MESSAGE RESET,F1
|
||||
MESSAGE RESET,F1.105
|
||||
MESSAGE RESET,F1.107</prescript>
|
||||
<field border="1" radius="100" x="25" y="0.25" type="Rettangolo" shade_offset="50" width="50" height="3" />
|
||||
<field x="25" y="0.75" type="Testo" valign="center" align="center" width="50" height="2" pattern="1" text="CONTI PER COMMESSA">
|
||||
<font face="Arial" bold="1" size="16" />
|
||||
</field>
|
||||
<field x="70" y="4" type="Testo" width="12" pattern="1" text="Data stampa:">
|
||||
<font face="Arial" size="8" />
|
||||
</field>
|
||||
<field x="80" y="4" type="Data" width="10" pattern="1">
|
||||
<source>#SYSTEM.DATE</source>
|
||||
</field>
|
||||
<field x="1" y="4.5" type="Testo" width="10" pattern="1" text="Esercizio:">
|
||||
<font face="Arial" size="8" />
|
||||
</field>
|
||||
<field x="1" y="5.5" type="Testo" width="15" pattern="1" text="Movimenti dal:">
|
||||
<font face="Arial" size="8" />
|
||||
</field>
|
||||
<field x="23" y="5.5" type="Testo" width="3" pattern="1" text="al:">
|
||||
<font face="Arial" size="8" />
|
||||
</field>
|
||||
<field x="1" y="6.5" type="Testo" width="10" pattern="1" text="Da fase:">
|
||||
<font face="Arial" size="8" />
|
||||
</field>
|
||||
<field x="23" y="6.5" type="Testo" width="7" pattern="1" text="a fase:">
|
||||
<font face="Arial" size="8" />
|
||||
</field>
|
||||
<field x="12" y="4.5" type="Numero" align="right" width="4" id="101" pattern="1">
|
||||
<source>#ANNO</source>
|
||||
</field>
|
||||
<field x="12" y="5.5" type="Data" width="10" id="102" pattern="1">
|
||||
<source>#DATAINI</source>
|
||||
</field>
|
||||
<field x="30" y="5.5" type="Data" width="10" id="103" pattern="1">
|
||||
<source>#DATAFIN</source>
|
||||
</field>
|
||||
<field x="12" y="6.5" type="Stringa" width="10" id="104" pattern="1">
|
||||
<source>#DACODFASE</source>
|
||||
</field>
|
||||
<field x="30" y="6.5" type="Stringa" width="10" id="105" pattern="1">
|
||||
<source>#ACODFASE</source>
|
||||
</field>
|
||||
</section>
|
||||
<section type="Head" level="2">
|
||||
<groupby>CODCMS</groupby>
|
||||
<font face="Arial" bold="1" size="8" />
|
||||
<prescript description="H2 PRESCRIPT">MESSAGE RESET,F2
|
||||
MESSAGE RESET,F2.105
|
||||
MESSAGE RESET,F2.107</prescript>
|
||||
<field border="1" x="1" y="1.5" type="Linea" width="100" height="0" pattern="1" />
|
||||
<field x="1" y="0.25" type="Stringa" width="20" id="101" pattern="1">
|
||||
<source>CODCMS</source>
|
||||
<postscript description="H2.101 POSTSCRIPT">MESSAGE COPY,F2.101</postscript>
|
||||
</field>
|
||||
<field x="22" y="0.25" type="Stringa" width="50" id="102" pattern="1">
|
||||
<prescript description="H2.102 PRESCRIPT">MESSAGE ISAMREAD,COMMESSE,CODCMS=#101,DESCRIZ</prescript>
|
||||
<postscript description="H2.102 POSTSCRIPT">MESSAGE COPY,F2.102</postscript>
|
||||
</field>
|
||||
</section>
|
||||
<section type="Head" level="3" hidden="1">
|
||||
<groupby>CODCONTO[1,6]</groupby>
|
||||
<prescript description="H3 PRESCRIPT">MESSAGE RESET,F3
|
||||
MESSAGE RESET,F3.105
|
||||
MESSAGE RESET,F3.107</prescript>
|
||||
<field x="2" type="Stringa" width="3" id="101" pattern="1">
|
||||
<source>CODCONTO[1,3]</source>
|
||||
<prescript description="H3.101 PRESCRIPT">MESSAGE COPY,F3.101</prescript>
|
||||
</field>
|
||||
<field x="5" type="Stringa" width="3" id="102" pattern="1">
|
||||
<source>CODCONTO[4,6]</source>
|
||||
<prescript description="H3.102 PRESCRIPT">MESSAGE COPY,F3.102</prescript>
|
||||
</field>
|
||||
</section>
|
||||
<section type="Body" />
|
||||
<section type="Body" level="1">
|
||||
<field x="3" type="Stringa" width="12" id="101" pattern="1">
|
||||
<source>CODCONTO</source>
|
||||
<prescript description="B1.101 PRESCRIPT">CA_FORMAT_CONTO</prescript>
|
||||
</field>
|
||||
<field x="16" type="Stringa" width="50" id="102" pattern="1">
|
||||
<source>CODCONTO</source>
|
||||
<prescript description="B1.102 PRESCRIPT">CA_FORMAT_CONTO_DESCR</prescript>
|
||||
</field>
|
||||
<field x="66" type="Array" hidden="1" width="1" id="103" pattern="1">
|
||||
<source>INDBIL</source>
|
||||
<list>
|
||||
<li Value="Costi" Code="3">MESSAGE ENABLE,1@|DISABLE,2@</li>
|
||||
<li Value="Ricavi" Code="4">MESSAGE DISABLE,1@|ENABLE,2@</li>
|
||||
</list>
|
||||
</field>
|
||||
<field x="67" type="Valuta" align="right" width="13" id="104" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||
<groups>1</groups>
|
||||
<source>IMPORTO</source>
|
||||
<postscript description="B1.104 POSTSCRIPT">#THIS @
|
||||
|
||||
#F3.105 @ \ se la sezione del tot &#E8; vuota la metto = alla mia sezione corrente
|
||||
EMPTY= IF
|
||||
#105 @
|
||||
#F3.105 !
|
||||
THEN
|
||||
|
||||
#105 @
|
||||
#F3.105 @
|
||||
C;E; IF \ se sono diverse le sezioni deve sottrarmi al totale
|
||||
-1 *
|
||||
THEN
|
||||
#F3.104 +!
|
||||
|
||||
|
||||
#THIS @ \ stesso lavoro per il totale di commessa
|
||||
|
||||
#F2.105 @
|
||||
EMPTY= IF
|
||||
#105 @
|
||||
#F2.105 !
|
||||
THEN
|
||||
|
||||
#105 @
|
||||
#F2.105 @
|
||||
C;E; IF -1 *
|
||||
THEN
|
||||
#F2.104 +!
|
||||
|
||||
|
||||
#THIS @ \ stesso lavoro per il totale generale
|
||||
|
||||
#F1.105 @
|
||||
EMPTY= IF
|
||||
#105 @
|
||||
#F1.105 !
|
||||
THEN
|
||||
|
||||
#105 @
|
||||
#F1.105 @
|
||||
C;E; IF -1 *
|
||||
THEN
|
||||
#F1.104 +!</postscript>
|
||||
</field>
|
||||
<field x="80.5" type="Stringa" width="2" id="105" pattern="1">
|
||||
<groups>1</groups>
|
||||
<source>SEZIONE</source>
|
||||
</field>
|
||||
<field x="84.5" type="Valuta" align="right" width="13" id="106" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||
<groups>2</groups>
|
||||
<source>IMPORTO</source>
|
||||
<postscript description="B1.106 POSTSCRIPT">#THIS @
|
||||
|
||||
#F3.107 @ \ se la sezione del tot &#E8; vuota la metto = alla mia sezione corrente
|
||||
EMPTY= IF
|
||||
#107 @
|
||||
#F3.107 !
|
||||
THEN
|
||||
|
||||
#107 @
|
||||
#F3.107 @
|
||||
C;E; IF \ se sono diverse le sezioni deve sottrarmi al totale
|
||||
-1 *
|
||||
THEN
|
||||
#F3.106 +!
|
||||
|
||||
|
||||
#THIS @ \ stesso lavoro per il totale commessa
|
||||
|
||||
#F2.107 @
|
||||
EMPTY= IF
|
||||
#107 @
|
||||
#F2.107 !
|
||||
THEN
|
||||
|
||||
#107 @
|
||||
#F2.107 @
|
||||
C;E; IF
|
||||
-1 *
|
||||
THEN
|
||||
#F2.106 +!
|
||||
|
||||
|
||||
#THIS @ \ stesso lavoro per il totale generale
|
||||
|
||||
#F1.107 @
|
||||
EMPTY= IF
|
||||
#107 @
|
||||
#F1.107 !
|
||||
THEN
|
||||
|
||||
#107 @
|
||||
#F1.107 @
|
||||
C;E; IF -1 *
|
||||
THEN
|
||||
#F1.106 +!</postscript>
|
||||
</field>
|
||||
<field x="98" type="Stringa" width="2" id="107" pattern="1">
|
||||
<groups>2</groups>
|
||||
<source>SEZIONE</source>
|
||||
</field>
|
||||
</section>
|
||||
<section type="Foot">
|
||||
<font face="Arial" bold="1" size="8" />
|
||||
<field border="1" x="1" y="0.5" type="Linea" width="100" height="0" pattern="1" />
|
||||
<field x="85" y="0.75" type="Testo" width="5" pattern="1" text="Pag." />
|
||||
<field x="90" y="0.75" type="Numero" align="right" width="3" pattern="1">
|
||||
<source>#REPORT.PAGE</source>
|
||||
</field>
|
||||
</section>
|
||||
<section type="Foot" level="1">
|
||||
<font italic="1" face="Arial" bold="1" size="8" />
|
||||
<field border="2" x="1" y="0.5" type="Linea" width="100" height="0" pattern="1" />
|
||||
<field x="2" y="1" type="Testo" width="20" pattern="1" text="TOTALE GENERALE">
|
||||
<font face="Arial" bold="1" size="8" />
|
||||
</field>
|
||||
<field x="65.5" y="1" type="Valuta" align="right" width="14" id="104" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||
<font face="Arial" bold="1" size="8" />
|
||||
<prescript description="F1.104 PRESCRIPT">#THIS @ \ se importo negativo cambia segno e inverte sezione
|
||||
0 C; IF
|
||||
-1 *
|
||||
#THIS !
|
||||
|
||||
#105 @
|
||||
"D" = IF
|
||||
"A"
|
||||
ELSE
|
||||
"D"
|
||||
THEN
|
||||
#105 !
|
||||
|
||||
THEN</prescript>
|
||||
</field>
|
||||
<field x="80" y="1" type="Stringa" width="2" id="105" pattern="1">
|
||||
<font face="Arial" bold="1" size="8" />
|
||||
<prescript description="F1.105 PRESCRIPT">#104 @
|
||||
0 = IF
|
||||
HIDE
|
||||
ELSE
|
||||
SHOW
|
||||
THEN</prescript>
|
||||
</field>
|
||||
<field x="83.5" y="1" type="Valuta" align="right" width="14" id="106" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||
<font face="Arial" bold="1" size="8" />
|
||||
<prescript description="F1.106 PRESCRIPT">#THIS @ \ se importo negativo cambia segno e inverte sezione
|
||||
0 C; IF
|
||||
-1 *
|
||||
#THIS !
|
||||
|
||||
#107 @
|
||||
"D" = IF
|
||||
"A"
|
||||
ELSE
|
||||
"D"
|
||||
THEN
|
||||
#107 !
|
||||
|
||||
THEN</prescript>
|
||||
</field>
|
||||
<field x="98" y="1" type="Stringa" width="2" id="107" pattern="1">
|
||||
<font face="Arial" bold="1" size="8" />
|
||||
<prescript description="F1.107 PRESCRIPT">#106 @
|
||||
0 = IF
|
||||
HIDE
|
||||
ELSE
|
||||
SHOW
|
||||
THEN</prescript>
|
||||
</field>
|
||||
</section>
|
||||
<section type="Foot" level="2" height="3">
|
||||
<font italic="1" face="Arial" bold="1" size="8" />
|
||||
<field border="1" x="1" y="0.25" type="Linea" width="100" height="0" pattern="1" />
|
||||
<field x="1" y="0.75" type="Testo" width="6" pattern="1" text="Totale" />
|
||||
<field x="8" y="0.75" type="Stringa" width="15" id="101" pattern="1">
|
||||
<font italic="1" face="Arial Narrow" bold="1" size="8" />
|
||||
</field>
|
||||
<field x="24" y="0.75" type="Stringa" width="35" id="102" pattern="1">
|
||||
<font italic="1" face="Arial Narrow" bold="1" size="8" />
|
||||
</field>
|
||||
<field x="66.5" y="0.75" type="Valuta" align="right" width="13" id="104" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||
<font face="Arial" bold="1" size="8" />
|
||||
<prescript description="F2.104 PRESCRIPT">#THIS @ \ se importo negativo cambia segno e inverte sezione
|
||||
0 C; IF
|
||||
-1 *
|
||||
#THIS !
|
||||
|
||||
#105 @
|
||||
"D" = IF
|
||||
"A"
|
||||
ELSE
|
||||
"D"
|
||||
THEN
|
||||
#105 !
|
||||
|
||||
THEN</prescript>
|
||||
</field>
|
||||
<field x="80" y="0.75" type="Stringa" width="2" id="105" pattern="1">
|
||||
<font face="Arial" bold="1" size="8" />
|
||||
<prescript description="F2.105 PRESCRIPT">#104 @
|
||||
0 = IF
|
||||
HIDE
|
||||
ELSE
|
||||
SHOW
|
||||
THEN</prescript>
|
||||
</field>
|
||||
<field x="84.5" y="0.75" type="Valuta" align="right" width="13" id="106" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||
<font face="Arial" bold="1" size="8" />
|
||||
<prescript description="F2.106 PRESCRIPT">#THIS @ \ se importo negativo cambia segno e inverte sezione
|
||||
0 C; IF
|
||||
-1 *
|
||||
#THIS !
|
||||
|
||||
#107 @
|
||||
"D" = IF
|
||||
"A"
|
||||
ELSE
|
||||
"D"
|
||||
THEN
|
||||
#107 !
|
||||
|
||||
THEN</prescript>
|
||||
</field>
|
||||
<field x="98" y="0.75" type="Stringa" width="2" id="107" pattern="1">
|
||||
<font face="Arial" bold="1" size="8" />
|
||||
<prescript description="F2.107 PRESCRIPT">#106 @
|
||||
0 = IF
|
||||
HIDE
|
||||
ELSE
|
||||
SHOW
|
||||
THEN</prescript>
|
||||
</field>
|
||||
</section>
|
||||
<section type="Foot" level="3" height="1.5">
|
||||
<font italic="1" face="Arial" bold="1" size="8" />
|
||||
<field x="10" type="Stringa" width="50" pattern="1">
|
||||
<prescript description="F3.0 PRESCRIPT">MESSAGE ISAMREAD,PCON,GRUPPO=#101!CONTO=#102,DESCR</prescript>
|
||||
</field>
|
||||
<field x="2" type="Stringa" width="3" id="101" pattern="1" />
|
||||
<field x="5" type="Stringa" width="3" id="102" pattern="1" />
|
||||
<field x="66.5" type="Valuta" align="right" width="13" id="104" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||
<prescript description="F3.104 PRESCRIPT">#THIS @ \ se importo negativo cambia segno e inverte sezione
|
||||
0 C; IF
|
||||
-1 *
|
||||
#THIS !
|
||||
|
||||
#105 @
|
||||
"D" = IF
|
||||
"A"
|
||||
ELSE
|
||||
"D"
|
||||
THEN
|
||||
#105 !
|
||||
|
||||
THEN</prescript>
|
||||
</field>
|
||||
<field x="80" type="Stringa" width="2" id="105" pattern="1">
|
||||
<prescript description="F3.105 PRESCRIPT">#104 @
|
||||
0 = IF
|
||||
HIDE
|
||||
ELSE
|
||||
SHOW
|
||||
THEN</prescript>
|
||||
</field>
|
||||
<field x="84.5" type="Valuta" align="right" width="13" id="106" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||
<prescript description="F3.106 PRESCRIPT">#THIS @ \ se importo negativo cambia segno e inverte sezione
|
||||
0 C; IF
|
||||
-1 *
|
||||
#THIS !
|
||||
|
||||
#107 @
|
||||
"D" = IF
|
||||
"A"
|
||||
ELSE
|
||||
"D"
|
||||
THEN
|
||||
#107 !
|
||||
|
||||
THEN</prescript>
|
||||
</field>
|
||||
<field x="98" type="Stringa" width="2" id="107" pattern="1">
|
||||
<prescript>#106 @
|
||||
0 = IF
|
||||
HIDE
|
||||
ELSE
|
||||
SHOW
|
||||
THEN</prescript>
|
||||
</field>
|
||||
</section>
|
||||
<section type="Foot" />
|
||||
<section type="Foot" level="1" />
|
||||
</report>
|
121
ca/ca1800a.uml
121
ca/ca1800a.uml
@ -52,15 +52,19 @@ BEGIN
|
||||
DISPLAY "Data inizio esercizio" D0
|
||||
DISPLAY "Data fine esercizio" D1
|
||||
OUTPUT F_ANNO CODTAB
|
||||
OUTPUT F_DATAINI D0
|
||||
OUTPUT F_DATAFIN D1
|
||||
FLAGS "RZ"
|
||||
ADD RUN cg0 -5 esc
|
||||
CHECKTYPE NORMAL
|
||||
WARNING "Codice esercizio assente"
|
||||
FIELD #ANNO
|
||||
END
|
||||
|
||||
DATE F_DATAINI
|
||||
BEGIN
|
||||
PROMPT 2 5 "Dalla data "
|
||||
FIELD #DATAINI
|
||||
END
|
||||
|
||||
DATE F_DATAFIN
|
||||
@ -68,6 +72,7 @@ BEGIN
|
||||
PROMPT 50 5 "alla data "
|
||||
VALIDATE DATE_CMP_FUNC >= F_DATAINI
|
||||
WARNING "La data finale deve essere succeviva a quella iniziale"
|
||||
FIELD #DATAFIN
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 79 4
|
||||
@ -77,63 +82,118 @@ END
|
||||
|
||||
STRING F_DACODCMS 20
|
||||
BEGIN
|
||||
PROMPT 2 8 "Da Commessa "
|
||||
PROMPT 2 8 "Da "
|
||||
FLAGS "UZ"
|
||||
USE COMMESSE
|
||||
INPUT CODCMS F_DACODCMS
|
||||
DISPLAY "Codice@20" CODCMS
|
||||
DISPLAY "Descrizione@50" DESCRIZ
|
||||
OUTPUT F_DACODCMS CODCMS
|
||||
OUTPUT F_DADESCMS DESCRIZ
|
||||
CHECKTYPE SEARCH
|
||||
FIELD #DACODCMS
|
||||
END
|
||||
|
||||
STRING F_DADESCMS 50 48
|
||||
BEGIN
|
||||
PROMPT 29 8 ""
|
||||
USE COMMESSE KEY 2
|
||||
INPUT DESCRIZ F_DADESCMS
|
||||
DISPLAY "Descrizione@50" DESCRIZ
|
||||
DISPLAY "Codice@20" CODCMS
|
||||
COPY OUTPUT F_DACODCMS
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
STRING F_ACODCMS 20
|
||||
BEGIN
|
||||
PROMPT 2 9 "A "
|
||||
FLAGS "UZ"
|
||||
COPY USE F_DACODCMS
|
||||
INPUT CODCMS F_ACODCMS
|
||||
COPY DISPLAY F_DACODCMS
|
||||
OUTPUT F_ACODCMS CODCMS
|
||||
OUTPUT F_ADESCMS DESCRIZ
|
||||
CHECKTYPE SEARCH
|
||||
FIELD #ACODCMS
|
||||
END
|
||||
|
||||
STRING F_ADESCMS 50 48
|
||||
BEGIN
|
||||
PROMPT 29 9 ""
|
||||
COPY USE F_DADESCMS
|
||||
INPUT DESCRIZ F_ADESCMS
|
||||
COPY DISPLAY F_DADESCMS
|
||||
COPY OUTPUT F_ACODCMS
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 79 4
|
||||
BEGIN
|
||||
PROMPT 1 11 "@bSelezione fasi"
|
||||
END
|
||||
|
||||
STRING F_DACODFASE 10
|
||||
BEGIN
|
||||
PROMPT 50 8 "Da fase "
|
||||
PROMPT 2 12 "Da "
|
||||
FLAGS "UZ"
|
||||
USE FASI
|
||||
INPUT CODFASE F_DACODFASE
|
||||
DISPLAY "Codice@20" CODFASE
|
||||
DISPLAY "Descrizione@50" DESCRIZ
|
||||
OUTPUT F_DACODFASE CODFASE
|
||||
OUTPUT F_DADESFASE DESCRIZ
|
||||
CHECKTYPE SEARCH
|
||||
FIELD #DACODFASE
|
||||
END
|
||||
|
||||
STRING F_ACODCMS 20
|
||||
STRING F_DADESFASE 50
|
||||
BEGIN
|
||||
PROMPT 2 9 "A Commessa "
|
||||
FLAGS "UZ"
|
||||
COPY USE F_DACODCMS
|
||||
INPUT CODCMS F_ACODCMS
|
||||
COPY DISPLAY F_DACODCMS
|
||||
OUTPUT F_ACODCMS CODCMS
|
||||
CHECKTYPE SEARCH
|
||||
PROMPT 19 12 ""
|
||||
USE FASI KEY 2
|
||||
INPUT DESCRIZ F_DADESFASE
|
||||
DISPLAY "Descrizione@50" DESCRIZ
|
||||
DISPLAY "Codice@20" CODFASE
|
||||
COPY OUTPUT F_DACODFASE
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
STRING F_ACODFASE 10
|
||||
BEGIN
|
||||
PROMPT 50 9 "A fase "
|
||||
PROMPT 2 13 "A "
|
||||
FLAGS "UZ"
|
||||
COPY USE F_DACODFASE
|
||||
INPUT CODFASE F_ACODFASE
|
||||
COPY DISPLAY F_DACODFASE
|
||||
OUTPUT F_ACODFASE CODFASE
|
||||
OUTPUT F_ADESFASE DESCRIZ
|
||||
CHECKTYPE SEARCH
|
||||
FIELD #ACODFASE
|
||||
END
|
||||
|
||||
STRING F_ADESFASE 50
|
||||
BEGIN
|
||||
PROMPT 19 13 ""
|
||||
COPY USE F_DADESFASE
|
||||
INPUT DESCRIZ F_ADESFASE
|
||||
COPY DISPLAY F_DADESFASE
|
||||
COPY OUTPUT F_ACODFASE
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 79 6
|
||||
BEGIN
|
||||
PROMPT 1 12 "@bSelezione conti"
|
||||
PROMPT 1 15 "@bSelezione conti (solo conti di costo/ricavo)"
|
||||
END
|
||||
|
||||
NUMBER F_GRUPPOINI 3
|
||||
BEGIN
|
||||
PROMPT 2 13 "Da Gruppo - Conto - Sottoconto "
|
||||
PROMPT 2 16 "Da Gruppo - Conto - Sottoconto "
|
||||
END
|
||||
|
||||
NUMBER F_CONTOINI 3
|
||||
BEGIN
|
||||
PROMPT 39 13 ""
|
||||
PROMPT 39 16 ""
|
||||
USE LF_PCON SELECT (CONTO!="")&&(SOTTOCONTO="")
|
||||
INPUT GRUPPO F_GRUPPOINI
|
||||
INPUT CONTO F_CONTOINI
|
||||
@ -150,7 +210,7 @@ END
|
||||
|
||||
NUMBER F_SOTTOCINI 6
|
||||
BEGIN
|
||||
PROMPT 46 13 ""
|
||||
PROMPT 46 16 ""
|
||||
USE LF_PCON SELECT SOTTOCONTO!=""
|
||||
INPUT GRUPPO F_GRUPPOINI
|
||||
INPUT CONTO F_CONTOINI
|
||||
@ -169,7 +229,7 @@ END
|
||||
|
||||
STRING F_DESCRINI 50
|
||||
BEGIN
|
||||
PROMPT 2 14 "Descrizione "
|
||||
PROMPT 2 17 "Descrizione "
|
||||
USE LF_PCON KEY 2
|
||||
CHECKTYPE NORMAL
|
||||
INPUT DESCR F_DESCRINI
|
||||
@ -183,12 +243,12 @@ END
|
||||
|
||||
NUMBER F_GRUPPOFIN 3
|
||||
BEGIN
|
||||
PROMPT 2 15 "A Gruppo - Conto - Sottoconto "
|
||||
PROMPT 2 18 "A Gruppo - Conto - Sottoconto "
|
||||
END
|
||||
|
||||
NUMBER F_CONTOFIN 3
|
||||
BEGIN
|
||||
PROMPT 39 15 ""
|
||||
PROMPT 39 18 ""
|
||||
USE LF_PCON SELECT (CONTO!="")&&(SOTTOCONTO="")
|
||||
INPUT GRUPPO F_GRUPPOFIN
|
||||
INPUT CONTO F_CONTOFIN
|
||||
@ -205,7 +265,7 @@ END
|
||||
|
||||
NUMBER F_SOTTOCFIN 6
|
||||
BEGIN
|
||||
PROMPT 46 15 ""
|
||||
PROMPT 46 18 ""
|
||||
USE LF_PCON SELECT SOTTOCONTO!=""
|
||||
INPUT GRUPPO F_GRUPPOFIN
|
||||
INPUT CONTO F_CONTOFIN
|
||||
@ -225,7 +285,7 @@ END
|
||||
|
||||
STRING F_DESCRFIN 50
|
||||
BEGIN
|
||||
PROMPT 2 16 "Descrizione "
|
||||
PROMPT 2 19 "Descrizione "
|
||||
USE LF_PCON KEY 2
|
||||
CHECKTYPE NORMAL
|
||||
INPUT DESCR F_DESCRFIN
|
||||
@ -237,29 +297,14 @@ BEGIN
|
||||
ADD RUN cg0 -0
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 79 3
|
||||
BOOLEAN F_HIDESOTT
|
||||
BEGIN
|
||||
PROMPT 1 18 "@bSelezione elementi da stampare"
|
||||
END
|
||||
|
||||
BOOLEAN F_DETTAGLI
|
||||
BEGIN
|
||||
PROMPT 2 19 "Dettagli sottoconto"
|
||||
END
|
||||
|
||||
BOOLEAN F_TOTCONTI
|
||||
BEGIN
|
||||
PROMPT 31 19 "Totali per conto"
|
||||
END
|
||||
|
||||
BOOLEAN F_TOTCMS
|
||||
BEGIN
|
||||
PROMPT 57 19 "Totali per commessa"
|
||||
PROMPT 1 21 "Nascondi sottoconti"
|
||||
END
|
||||
|
||||
STRING F_REPORT 50
|
||||
BEGIN
|
||||
PROMPT 1 21 "Report personalizzato "
|
||||
PROMPT 1 22 "Report personalizzato "
|
||||
RSELECT ""
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
Loading…
x
Reference in New Issue
Block a user