Patch level : 2.1

Files correlati     : ba8.exe
Ricompilazione Demo : [ ]
Commento            :

Correzioni su editor e convertitore di report


git-svn-id: svn://10.65.10.50/trunk@12094 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2004-05-18 13:49:41 +00:00
parent 3b5d0a5939
commit 018029f5a6
10 changed files with 391 additions and 153 deletions

View File

@ -17,7 +17,7 @@
// Utility
///////////////////////////////////////////////////////////
static TString8 _str;
static TString16 _str;
const TString& num2str(int num)
{
@ -363,6 +363,7 @@ void TReport_field_mask::set_field(const TReport_field& rf)
_bgcolor = rf.back_color();
set(F_TEXT, rf.picture());
set(F_SOURCE, rf.field());
set(F_SOURCE2, rf.alternate_field());
set_font_info(rf.font());
set(F_PRESCRIPT, rf.prescript());
@ -394,6 +395,7 @@ void TReport_field_mask::get_field(TReport_field& rf) const
rf.set_back_color(_bgcolor);
rf.set_picture(get(F_TEXT));
rf.set_field(get(F_SOURCE));
rf.set_alternate_field(get(F_SOURCE2));
TReport_font f;
if (get_font_info(f))
rf.set_font(f);
@ -536,6 +538,7 @@ void TSection_properties_mask::vedo_non_vedo()
const int level = get_int(F_LEVEL);
show(F_X, level == 0 && type != 'H');
show(F_Y, level == 0 && type != 'H');
show(F_CONDITION, type == 'B' && level > 0);
show(F_GROUP_BY, type == 'H' && level > 1);
show(F_KEEP_WITH_NEXT, level > 1 && type == 'H');
show(F_HIDE_IF_NEEDED, level == 0 && type != 'B');
@ -578,8 +581,9 @@ void TSection_properties_mask::set_section(const TReport_section& rs)
}
set_num(F_DX, rs.width());
set_num(F_DY, rs.height());
set(F_CONDITION, rs.condition());
set(F_GROUP_BY, rs.grouped_by());
set(F_HIDE_IF_NEEDED, rs.hidden_if_needed() ? "X" : "");
set(F_HIDDEN, rs.hidden() ? "X" : "");
set(F_PAGE_BREAK, rs.page_break());
@ -606,6 +610,7 @@ void TSection_properties_mask::get_section(TReport_section& rs) const
rs.show(!get_bool(F_HIDDEN));
rs.activate(!get_bool(F_DISABLED));
rs.set_condition(get(F_CONDITION));
rs.group_by(get(F_GROUP_BY));
rs.hide_if_needed(get_bool(F_HIDE_IF_NEEDED));
rs.force_page_break(get_bool(F_PAGE_BREAK));
@ -649,8 +654,11 @@ void TReport_properties_mask::set_report(const TReport& r)
{
set(F_DY, r.lpi());
set_font_info(r.font());
set(F_INCLUDE, ((TReport&)r).get_libraries());
set(F_PRESCRIPT, r.prescript());
set(F_POSTSCRIPT, r.postscript());
sfield(F_PARAMS).rows_array() = r.params();
}
void TReport_properties_mask::get_report(TReport& r) const
@ -660,8 +668,17 @@ void TReport_properties_mask::get_report(TReport& r) const
TReport_font f;
if (get_font_info(f))
r.set_font(f);
const TString& oldlib = r.get_libraries();
if (oldlib != get(F_INCLUDE))
{
r.set_libraries(get(F_INCLUDE));
r.include_libraries(); // reload
}
r.set_prescript(get(F_PRESCRIPT));
r.set_postscript(get(F_POSTSCRIPT));
r.set_params(sfield(F_PARAMS).rows_array());
}
///////////////////////////////////////////////////////////

View File

@ -33,12 +33,15 @@
#define F_LINK 141
#define F_LIST 142
#define F_INCLUDE 143
#define F_PARAMS 144
#define F_SOURCE2 145
#define F_LEVEL 160
#define F_GROUP_BY 161
#define F_HIDE_IF_NEEDED 162
#define F_PAGE_BREAK 163
#define F_KEEP_WITH_NEXT 164
#define F_CONDITION 165
#define F_SQL 201
#define F_IMPORT_QRY 202

View File

@ -89,6 +89,11 @@ BEGIN
PROMPT 1 10 "@bSorgente"
END
STRING F_SOURCE2 80 46
BEGIN
PROMPT 1 14 "@bSorgente alternativa "
END
BUTTON DLG_FINDREC 10 2
BEGIN
PROMPT -33, 9 ""

View File

@ -68,10 +68,17 @@ BEGIN
FLAGS "H"
END
MEMO F_CONDITION 48 3
BEGIN
// Visibile sezioni con livello > 0
PROMPT 1 6 "Condizione"
FLAGS "H"
END
MEMO F_GROUP_BY 48 3
BEGIN
// Visibile per sezioni con livello > 1
PROMPT 1 6 "Raggruppamento "
PROMPT 1 9 "Raggruppamento"
FLAGS "H"
CHECKTYPE REQUIRED
END

View File

@ -4,13 +4,20 @@ PAGE "Report" -1 -1 60 13
NUMBER F_DY 2
BEGIN
PROMPT 1 1 "Linee per pollice "
PROMPT 1 0 "Linee per pollice "
CHEKCTYPE REQUIRED
END
BUTTON F_FONT_SELECT 10 2
BEGIN
PROMPT 1 3 "~Font"
PROMPT 1 1 "~Font"
END
SPREADSHEET F_PARAMS 0 -3
BEGIN
PROMPT 1 3 ""
ITEM "Parametro@16"
ITEM "Valore@50"
END
BUTTON DLG_CANCEL 10 2
@ -56,3 +63,34 @@ ENDPAGE
ENDMASK
PAGE "Parametri" -1 -1 60 5
STRING 101 15
BEGIN
PROMPT 1 1 "Parametro "
END
STRING 102 50
BEGIN
PROMPT 1 2 "Valore "
END
BUTTON DLG_CANCEL 10 2
BEGIN
PROMPT -13 -1 ""
END
BUTTON DLG_DELREC 10 2
BEGIN
PROMPT -23 -1 ""
END
BUTTON DLG_OK 10 2
BEGIN
PROMPT -33 -1 ""
END
ENDPAGE
ENDMASK

View File

@ -8,6 +8,8 @@
#include "ba8400.h"
#include <rdoc.h>
///////////////////////////////////////////////////////////
// TFormer_mask
///////////////////////////////////////////////////////////
@ -17,10 +19,12 @@ class TFormer_mask : public TAutomask
bool _doc;
protected:
void run_app(const char* app) const;
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
void parse_field_line(const TString& line, TReport_field& rf) const;
void import_section(TScanner& scan, TReport_section& rs) const;
void import_general(TScanner& scan, TReport& rep) const;
void import_sections(TScanner& scan, TReport& rep) const;
void import_use(TScanner& scan, TReport& rep) const;
void import();
@ -55,18 +59,7 @@ void TFormer_mask::import_use(TScanner& scan, TReport& rep) const
}
if (!use.blank())
{
if (_doc)
{
int pos = use.find(" 33");
if (pos >= 0 && pos < 10)
use.overwrite("4", pos+2);
pos = use.find("JOIN 34");
if (pos >= 0)
use.overwrite("3", pos+6);
}
rep.set_recordset(use);
}
}
void TFormer_mask::parse_field_line(const TString& line, TReport_field& rf) const
@ -78,12 +71,17 @@ void TFormer_mask::parse_field_line(const TString& line, TReport_field& rf) cons
if (head.starts_with("FI"))
{
TString fld = head.get(1);
if (_doc)
const int arrow = fld.find("->");
if (arrow > 0)
{
if (fld.find("->") < 0)
fld.insert("33->");
const TString& right = fld.mid(arrow+2);
fld.cut(arrow);
fld << '.' << right;
}
rf.set_field(fld);
if (rf.field().blank())
rf.set_field(fld);
else
rf.set_alternate_field(fld);
} else
if (head.starts_with("FL"))
{
@ -92,7 +90,7 @@ void TFormer_mask::parse_field_line(const TString& line, TReport_field& rf) cons
{
switch (flags[i])
{
case 'D': rf.hide(); rf.deactivate(); break;
case 'D': rf.deactivate(); break;
case 'H': rf.hide(); break;
case 'U':
if (rf.type() == 'V')
@ -102,20 +100,94 @@ void TFormer_mask::parse_field_line(const TString& line, TReport_field& rf) cons
}
}
} else
if (head.starts_with("GR"))
{
TString g = rf.groups();
for (int i = head.items()-1; i > 0; i--)
g << ' ' << head.get(i);
rf.set_groups(g);
} else
if (head.starts_with("ME"))
{
head.add("MESSAGE", 0);
TString me = rf.prescript();
me << head << '\n';
rf.set_prescript(head);
if (head.find("NUMEXPR") > 0 || head.find("STREXPR") > 0)
{
const int pos = head.find(',')+1;
rf.set_field(head.mid(pos));
}
else
{
head.add("MESSAGE", 0);
TString me = rf.prescript();
if (me.not_empty())
me << '\n';
me << head;
rf.set_prescript(me);
}
} else
if (head.starts_with("PI"))
{
const int apici = head.find('"');
if (apici > 0)
{
TString pic = head.mid(apici);
pic.strip("\"");
pic.insert(rf.picture());
rf.set_picture(pic);
}
} else
if (head.starts_with("PR"))
{
const int x = 100*(head.get_int(1)-1);
const int y = 100*(head.get_int()-1);
rf.set_pos(x, y);
if (rf.type() == 'I')
rf.set_field(head.get());
const int apici = head.find('"');
if (apici > 0)
{
TString prompt = head.mid(apici);
if (rf.type() == 'I')
rf.set_field(prompt);
else
{
prompt.strip("\"");
rf.set_picture(prompt);
}
}
}
}
void TFormer_mask::import_general(TScanner& scan, TReport& rep) const
{
TString expr;
while (scan.ok())
{
TString& line = scan.line();
if (line.empty() || line.starts_with("EN"))
break;
if (_doc && line.starts_with("EXCLUDE"))
{
TToken_string exclude(50, ',');
exclude = line.after('"');
exclude.strip("\""); exclude.trim();
TString cond, codart;
cond << "(34.TIPORIGA='" << exclude.get(0) << "\')";
codart = exclude.get(1);
if (!codart.blank())
{
cond.insert("(");
cond << "&&(34.CODART?='" << codart << "')";
cond << ')';
}
if (expr.not_empty())
expr << "||";
expr << cond;
}
}
if (_doc && expr.not_empty())
{
expr.insert("!(");
expr << ')';
rep.section('B', 1).set_condition(expr);
}
}
@ -150,7 +222,8 @@ void TFormer_mask::import_section(TScanner& scan, TReport_section& rs) const
{
const int id = head.get_int(1);
const int width = 100*head.get_int();
const int height = 100*head.get_int();
int height = 100*head.get_int();
if (height <= 0) height = 100;
cur_field = new TReport_field(&rs);
cur_field->set_type(type);
@ -158,15 +231,15 @@ void TFormer_mask::import_section(TScanner& scan, TReport_section& rs) const
cur_field->set_id(id);
if (width > 0)
cur_field->set_width(width);
if (height > 0)
{
if (_doc && type == 'S' && height >= 5 && rs.type() == 'B')
cur_field->set_height(0);
else
cur_field->set_height(height);
}
if (_doc && type == 'S' && height >= 500 && rs.type() == 'B')
cur_field->set_height(0); // Altezaa descrizione automatica
else
cur_field->set_height(height);
if (strchr("NVP", type) != NULL)
{
cur_field->set_horizontal_alignment('R');
cur_field->hide_zeroes(true);
}
rs.add(cur_field);
}
@ -176,6 +249,12 @@ void TFormer_mask::import_section(TScanner& scan, TReport_section& rs) const
{
if (in_field >= 0)
{
if (cur_field != NULL)
{
// Trasforma in testi fissi i campi stringa senza sorgente
if (cur_field->type() == 'S' && cur_field->field().blank() && cur_field->prescript().blank())
cur_field->set_type('T');
}
in_field--; // END of field
cur_field = NULL;
}
@ -198,6 +277,9 @@ void TFormer_mask::import_sections(TScanner& scan, TReport& rep) const
TString& line = scan.line();
if (line.empty())
break;
if (line.starts_with("GE"))
import_general(scan, rep);
if (line.starts_with("SE"))
{
@ -271,10 +353,24 @@ void TFormer_mask::import()
import_use(scan, rep);
import_sections(scan, rep);
if (_doc)
rep.set_libraries("ve1100.alx");
rep.set_libraries("ve1300");
rep.save(get(F_REPORT));
}
void TFormer_mask::run_app(const char* app) const
{
const TFilename output = get(F_REPORT);
if (output.exist())
{
TString cmd;
cmd << app << ' ' << output;
TExternal_app app(cmd);
app.run();
}
else
::error_box(TR("Il file %s non esiste"), (const char*)output);
}
bool TFormer_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
{
switch (o.dlg())
@ -289,12 +385,16 @@ bool TFormer_mask::on_field_event(TOperable_field& o, TField_event e, long jolly
path = firm2dir(-1);
path.add("custom");
}
const TFilename input = o.get();
TFilename input = o.get();
input.ext("frm");
input.custom_path();
o.set(input);
output = path;
output.add(input.name());
output.ext("rep");
output.lower();
set(F_REPORT, output);
set(F_REPORT, output, true);
enable(DLG_ELABORA, input.exist());
}
break;
@ -302,7 +402,9 @@ bool TFormer_mask::on_field_event(TOperable_field& o, TField_event e, long jolly
if (e == fe_modify)
{
const TFilename output = get(F_REPORT);
enable(DLG_PRINT, output.exist());
const bool yes = output.exist();
enable(DLG_EDIT, yes);
enable(DLG_PRINT, yes);
}
break;
case DLG_ELABORA:
@ -318,22 +420,19 @@ bool TFormer_mask::on_field_event(TOperable_field& o, TField_event e, long jolly
enable(DLG_PRINT, output.exist());
}
break;
case DLG_EDIT:
if (e == fe_button)
run_app("ba8 -2");
break;
case DLG_PRINT:
if (e == fe_button)
{
const TFilename output = get(F_REPORT);
if (output.exist())
{
TString cmd;
cmd << "ba8 -2 " << output;
TExternal_app app(cmd);
app.run();
return false; // Altrimenti esce dalla maschera
}
if (get_bool(F_DOC))
run_app("ve1 -2");
else
return error_box(TR("Il file %s non esiste"), (const char*)output);
run_app("ba8 -2");
}
break;
return false;
default:
break;
}

View File

@ -11,6 +11,7 @@ END
STRING F_REPORT 256 50
BEGIN
PROMPT 1 2 "Report "
FSELECT "*.rep"
END
BOOLEAN F_DOC
@ -20,21 +21,28 @@ END
BUTTON DLG_ELABORA 10 2
BEGIN
PROMPT -13 -1 "~Elabora"
PROMPT -14 -1 "~Elabora"
PICTURE BMP_ELABORA
FLAGS "D"
END
BUTTON DLG_EDIT 10 2
BEGIN
PROMPT -24 -1 "~Edit"
PICTURE BMP_EDIT
FLAGS "D"
END
BUTTON DLG_PRINT 10 2
BEGIN
PROMPT -23 -1 "~Stampa"
PROMPT -34 -1 "~Stampa"
PICTURE BMP_PRINT
FLAGS "D"
END
BUTTON DLG_QUIT 10 2
BEGIN
PROMPT -33 -1 ""
PROMPT -44 -1 ""
END
ENDPAGE

View File

@ -2,56 +2,68 @@
\ Funzioni di aiuto per implementazione messaggi
\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
: GET_POS.X ( f1 -- n1 ) GET_POS DROP ;
: REP_GET_POS.X ( f1 -- n1 )
GET_POS DROP
;
: GET_POS.Y ( f1 -- n1 ) GET_POS NIP ;
: REP_GET_POS.Y ( f1 -- n1 )
GET_POS NIP
;
: GET_SIZE.X ( f1 -- n1 ) GET_POS DROP ;
: REP_GET_SIZE.X ( f1 -- n1 )
GET_POS DROP
;
: GET_SIZE.Y ( f1 -- n1 ) GET_SIZE NIP ;
: REP_GET_SIZE.Y ( f1 -- n1 )
GET_SIZE NIP
;
: GET_BOTTOM ( f1 -- n1 )
: REP_GET_BOTTOM ( f1 -- n1 )
DUP
GET_POS.Y
REP_GET_POS.Y
SWAP
GET_SIZE.Y
REP_GET_SIZE.Y
+
;
: OFFSET_FIELD_POS.X ( n1 -- )
#THIS GET_POS.X \ Legge posizione x
+ \ La incrementa di n1
#THIS GET_POS.Y \ Legge posizione y
#THIS SET_POS \ Aggiorna posizione
: REP_OFFSET_FIELD_POS.X ( n1 -- )
#THIS REP_GET_POS.X \ Legge posizione x
+ \ La incrementa di n1
#THIS REP_GET_POS.Y \ Legge posizione y
#THIS SET_POS \ Aggiorna posizione
;
: OFFSET_FIELD_POS.Y ( n1 -- )
#THIS GET_POS.Y \ Legge posizione y
+ \ La incrementa di n1
#THIS GET_POS.X \ Legge posizione x
SWAP \ Scambia le coordinate
#THIS SET_POS \ Aggiorna posizione
: REP_OFFSET_FIELD_POS.Y ( n1 -- )
#THIS REP_GET_POS.Y \ Legge posizione y
+ \ La incrementa di n1
#THIS REP_GET_POS.X \ Legge posizione x
SWAP \ Scambia le coordinate
#THIS SET_POS \ Aggiorna posizione
;
: MESSAGE_ALIGN_BOTTOM ( f1 -- )
GET_BOTTOM \ Calcola fondo di f1
#THIS GET_BOTTOM \ Calcola fondo del campo corrente
- \ Calcola offset come differenza dei due
OFFSET_FIELD_POS.Y \ Incrementa posizione y del campo corrente
: REP_MESSAGE_ALIGN_BOTTOM ( f1 -- )
REP_GET_BOTTOM \ Calcola fondo di f1
#THIS REP_GET_BOTTOM \ Calcola fondo del campo corrente
- \ Calcola offset come differenza dei due
REP_OFFSET_FIELD_POS.Y \ Incrementa posizione y del campo corrente
;
: MESSAGE_ALIGN_TOP ( f1 -- )
GET_POS.Y \ Legge posizione y del capo f1
#THIS GET_POS.X \ Legge posizione x del campo corrente
SWAP \ Scambia le coordinate
#THIS SET_POS \ Aggiorna posizione del campo corrente
: REP_MESSAGE_ALIGN_TOP ( f1 -- )
REP_GET_POS.Y \ Legge posizione y del capo f1
#THIS REP_GET_POS.X \ Legge posizione x del campo corrente
SWAP \ Scambia le coordinate
#THIS SET_POS \ Aggiorna posizione del campo corrente
;
: MESSAGE_ALIGN_CENTER ( f1 -- )
GET_BOTTOM \ Calcola fondo del campo f1
#THIS GET_BOTTOM \ Calcola fondo del campo corrente
- 2 / \ Calcola offset verticale
OFFSET_FIELD_POS.Y \ Aggiorna posizione del campo corrente
: REP_MESSAGE_ALIGN_CENTER ( f1 -- )
REP_GET_BOTTOM \ Calcola fondo del campo f1
#THIS REP_GET_BOTTOM \ Calcola fondo del campo corrente
- 2 / \ Calcola offset verticale
REP_OFFSET_FIELD_POS.Y \ Aggiorna posizione del campo corrente
;
: REP_FIELD_NOT_NULL ( f1 -- f1 b1 )
SP
;
\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
@ -60,46 +72,92 @@
\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
: MESSAGE_ADD ( f1 -- )
#THIS @ SWAP +! \ Incrementa f1 col contenuto del campo corrente
#THIS @ SWAP +! \ Incrementa f1 col contenuto del campo corrente
;
: MESSAGE_ALIGN ( s1 -- )
"MESSAGE_ALIGN_" SWAP + \ Si crea il nome della funzione da chiamare
PERFORM \ Chiama MESSAGE_ALIGN_BOTTOM, ecc...
: MESSAGE_ALIGN ( s1 f1 -- )
SWAP \ Porta su il tipo di allineamento (BOTTOM)
"REP_MESSAGE_ALIGN_" SWAP + \ Si crea il nome della funzione da chiamare
PERFORM \ Chiama ad esempio DO_MESSAGE_ALIGN_BOTTOM, ecc...
;
: MESSAGE_COPY ( f1 -- )
#THIS @ SWAP !
: MESSAGE_APPEND ( f1 -- )
MESSAGE_ADD \ Incrementa f1 col contenuto del campo corrente
;
: MESSAGE_DEBUG
MON \ Attiva il fantastico debugger
: MESSAGE_COPY ( f1 ... fn -- )
BEGIN \ Ciclo sui prametri
REP_FIELD_NOT_NULL
WHILE
#THIS @ SWAP ! \ Copia il campo corrente
REPEAT
DROP \ Butta via il NULL generato automaticamente
;
: MESSAGE_DISABLE ( f1 -- )
DISABLE \ User defined word
: MESSAGE_DEBUG ( NULL -- )
MON \ Attiva il fantastico debugger
;
: MESSAGE_ENABLE ( f1 -- )
ENABLE \ User defined word
: MESSAGE_DISABLE ( f1 ... fn -- )
BEGIN \ Ciclo sui prametri
REP_FIELD_NOT_NULL
WHILE
DISABLE \ Report defined word
REPEAT
;
: MESSAGE_HIDE ( f1 -- )
HIDE \ User defined word
: MESSAGE_ENABLE ( f1 ... fn -- )
BEGIN \ Ciclo sui parametri
REP_FIELD_NOT_NULL
WHILE
ENABLE \ Report defined word
REPEAT
;
: MESSAGE_INCR ( f1 -- )
INCR
: MESSAGE_HIDE ( f1 ... fn -- )
BEGIN \ Ciclo sui prametri
REP_FIELD_NOT_NULL
WHILE
HIDE \ Report defined word
REPEAT
;
: MESSAGE_PAGENO ( -- ) \ Numero di pagina corrente
: MESSAGE_INCR ( f1 ... fn -- )
BEGIN \ Ciclo sui prametri
REP_FIELD_NOT_NULL
WHILE
INCR \ Native word
REPEAT
;
: MESSAGE_ISAMREAD ( s1 s2 n1 -- )
ISAM_READ
;
: MESSAGE_PAGENO ( -- ) \ Numero di pagina corrente
#REPORT.PAGE @ #THIS !
;
: MESSAGE_RESET ( f1 -- )
NULL SWAP !
: MESSAGE_RESET ( f1 ... fn -- )
BEGIN \ Ciclo sui prametri
REP_FIELD_NOT_NULL
WHILE
NULL SWAP ! \ Azzera campo
REPEAT
;
: MESSAGE_SHOW ( f1 -- )
SHOW \ User defined word
: MESSAGE_SHOW ( f1 ... fn -- )
BEGIN \ Ciclo sui prametri
REP_FIELD_NOT_NULL
WHILE
SHOW \ Report defined word
REPEAT
;
: MESSAGE_SUB ( f1 -- )
#THIS @ -1 * SWAP +! \ Decrementa f1 col contenuto del campo corrente
;
: MESSAGE_TABLEREAD ( s1 s2 s3 -- )
TABLE_READ
;

View File

@ -1,46 +0,0 @@
\ Utility
: KILL_STACK
BEGIN
SP
WHILE
DROP
REPEAT
;
\ Messaggi specifici per stampa documenti
: MESSAGE_CLIENTE
KILL_STACK
;
: MESSAGE_DESCRIGA
#RDOC.DESCR @ \ Legge campo descrizione riga
#RDOC.DESCLUNGA @ \ Se e' presente una descrizione estesa
IF
#RDOC.DESCEST @ \ Legge memo descrizione
+ \ Lo somma alla descrizione normale
THEN
BEGIN \ Ciclo sugli eventuali parametri successivi
SP 1 > \ Se lo stack e' ancora pieno
WHILE
" " + \ Somma uno spazio
SWAP @ + \ Somma campo successivo alla descrizione
REPEAT
#THIS ! \ Setta il campo corrente con la stringa risultante
;
: MESSAGE_DITTA
KILL_STACK
;
: MESSAGE_RIEPILOGOIVA
KILL_STACK
;
: MESSAGE_SCADENZE
KILL_STACK
;
: MESSAGE_TOTIMPONIBILI
KILL_STACK
;

49
ba/ve1300.alx Executable file
View File

@ -0,0 +1,49 @@
\ Utility
\ Messaggi specifici per stampa documenti
: MESSAGE_DESCRIGA ( ... -- )
#RDOC.DESCR @ \ Legge campo descrizione riga
#RDOC.DESCLUNGA @ \ Se e' presente una descrizione estesa
EMPTY=
NEGATE
IF
#RDOC.DESCEST @ \ Legge memo descrizione
+ \ Lo somma alla descrizione normale
THEN
BEGIN \ Ciclo sugli eventuali parametri successivi
SP 1 > \ Controlla se ci sono altri campi da sommare
WHILE
" " + \ Somma uno spazio
SWAP @ + \ Somma campo successivo alla descrizione
REPEAT
#THIS ! \ Setta il campo corrente con la stringa risultante
;
: MESSAGE_CLIENTE ( s1 -- )
DOC_CLIENTE \ user defined word
;
: MESSAGE_DITTA ( s1 -- )
DOC_DITTA \ user defined word
;
: MESSAGE_PARENTDOC ( [b1] s1 n1 -- )
DOC_PARENT_DOC \ user defined word
;
: MESSAGE_PARENTROW ( [b1] s1 n1 -- )
DOC_PARENT_ROW \ user defined word
;
: MESSAGE_RIEPILOGOIVA ( b1 s1 n1 -- )
DOC_RIEPILOGO_IVA
;
: MESSAGE_SCADENZE ( b1 s1 -- )
DOC_SCADENZE
;
: MESSAGE_TOTIMPONIBILI ( [n1] -- )
DOC_TOT_IMPONIBILI
;