Patch level : 10.0 nopatch
Files correlati : ps0713.exe Ricompilazione Demo : [ ] Commento Importazione fatture ATS git-svn-id: svn://10.65.10.50/branches/R_10_00@20827 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
287f46c052
commit
220332e850
278
ps/ps0713300.cpp
278
ps/ps0713300.cpp
@ -3,20 +3,13 @@
|
||||
#include <execp.h>
|
||||
#include <progind.h>
|
||||
#include <tabutil.h>
|
||||
#include "../ve/velib.h"
|
||||
|
||||
#include <causali.h>
|
||||
#include <clifo.h>
|
||||
#include <mov.h>
|
||||
#include <rmov.h>
|
||||
#include <rmoviva.h>
|
||||
#include <doc.h>
|
||||
#include <rdoc.h>
|
||||
|
||||
#include "ps0713lib.h"
|
||||
|
||||
#include "../ca/calib01.h"
|
||||
#include "../ca/calib02.h"
|
||||
#include "../ca/movana.h"
|
||||
#include "../ca/rmovana.h"
|
||||
|
||||
#include "ps0713300a.h"
|
||||
|
||||
///////////////////////////////////
|
||||
@ -51,7 +44,6 @@ bool TImporta_fatacq_msk::on_field_event(TOperable_field& f, TField_event e, lon
|
||||
class TImporta_fatacq_app : public TSkeleton_application
|
||||
{
|
||||
TImporta_fatacq_msk* _msk;
|
||||
TConfig* _configfile;
|
||||
|
||||
protected:
|
||||
virtual bool check_autorization() const {return false;}
|
||||
@ -61,212 +53,90 @@ public:
|
||||
virtual bool create();
|
||||
virtual bool destroy();
|
||||
virtual void main_loop();
|
||||
long genera_movcg();
|
||||
void genera_analitica(const long numreg, TAssoc_array& righean);
|
||||
bool transfer(const TFilename& file, const long numreg, TAssoc_array& righean);
|
||||
bool get_doc(const TFilename& file, const TMask & m);
|
||||
void add_spesa(TDocumento & doc, const TString & cod, const real & perc);
|
||||
|
||||
TImporta_fatacq_app() {};
|
||||
};
|
||||
|
||||
long TImporta_fatacq_app::genera_movcg()
|
||||
void TImporta_fatacq_app::add_spesa(TDocumento & doc, const TString & cod, const real & perc)
|
||||
{
|
||||
TISAM_recordset movrec("USE MOV");
|
||||
movrec.move_last();
|
||||
long numreg = movrec.cursor()->curr().get_int(MOV_NUMREG); numreg++;
|
||||
if (cod.full() && perc != ZERO)
|
||||
{
|
||||
TSpesa_prest p(cod);
|
||||
TString tiporiga = p.get("S8").left(4);
|
||||
|
||||
TLocalisamfile mov(LF_MOV);
|
||||
mov.put(MOV_NUMREG, numreg);
|
||||
mov.put(MOV_DATACOMP, _msk->get_date(F_DATAREG));
|
||||
mov.put(MOV_DATAREG, _msk->get_date(F_DATAREG));
|
||||
mov.put(MOV_CODCAUS, _msk->get(F_CODCAU));
|
||||
mov.write();
|
||||
TRiga_documento & row = doc.new_row(tiporiga);
|
||||
|
||||
return numreg;
|
||||
row.put(RDOC_CODART, cod);
|
||||
row.put(RDOC_CHECKED, "X");
|
||||
row.put(RDOC_QTA, perc);
|
||||
row.put(RDOC_CODIVA, p.cod_iva());
|
||||
}
|
||||
}
|
||||
|
||||
void TImporta_fatacq_app::genera_analitica(const long numreg, TAssoc_array& righean)
|
||||
bool TImporta_fatacq_app::get_doc(const TFilename& file, const TMask & m)
|
||||
{
|
||||
TProgind pi(righean.items(), "Importazione analitica in corso...", true, true);
|
||||
|
||||
const TDate datareg = _msk->get_date(F_DATAREG);
|
||||
const int anno = _msk->get_date(F_DATAREG).year();
|
||||
|
||||
TToken_string key;
|
||||
key.add(_msk->get(F_CODCAU));
|
||||
key.add(1);
|
||||
key.add(1);
|
||||
const TRectype& causale = cache().get(LF_RCAUSALI, key);
|
||||
key.add(2, 1);
|
||||
const TRectype& causale1 = cache().get(LF_RCAUSALI, key);
|
||||
|
||||
//instanzio il movimento di analitica
|
||||
TAnal_mov anmo(0);
|
||||
anmo.put(MOVANA_NUMREGCG, numreg);
|
||||
anmo.put(MOVANA_DATACOMP, datareg);
|
||||
anmo.put(MOVANA_DATAREG, datareg);
|
||||
anmo.put(MOVANA_CODCAUS, _msk->get(F_CODCAU));
|
||||
anmo.put(MOVANA_ANNOES, anno);
|
||||
|
||||
//per ogni oggetto dell'assoc_array, creo una riga di analitica
|
||||
FOR_EACH_ASSOC_OBJECT(righean, obj, keyar, itm)
|
||||
{
|
||||
if (!pi.addstatus(1))
|
||||
break;
|
||||
|
||||
TCommessa_string& row = (TCommessa_string)keyar;
|
||||
const TString& idlav = row.idlavoro();
|
||||
const int gruppo = row.gruppo(); TString8 grup; grup.format("%03d", gruppo);
|
||||
const int conto = row.conto(); TString8 cont; cont.format("%03d", conto);
|
||||
const int sotco = row.sotco(); TString16 sotc; sotc.format("%06ld", sotco);
|
||||
TString80 codconto; codconto << grup << cont << sotc;
|
||||
|
||||
real& imp = *(real*)itm; imp.round(2);
|
||||
|
||||
if (!imp.is_zero())
|
||||
{
|
||||
TRectype& ranmo = anmo.new_row();
|
||||
ranmo.put(RMOVANA_ANNOES, anno);
|
||||
ranmo.put(RMOVANA_SEZIONE, causale1.get("SEZIONE"));
|
||||
ranmo.put(RMOVANA_CODCONTO, codconto);
|
||||
ranmo.put(RMOVANA_CODCMS, idlav);
|
||||
ranmo.put(RMOVANA_IMPORTO, imp);
|
||||
}
|
||||
}
|
||||
TLocalisamfile fmov(LF_MOVANA);
|
||||
anmo.write(fmov);
|
||||
}
|
||||
|
||||
bool TImporta_fatacq_app::transfer(const TFilename& file, const long numreg, TAssoc_array& righean)
|
||||
{
|
||||
TLocalisamfile mov(LF_MOV);
|
||||
mov.put(MOV_NUMREG, numreg);
|
||||
mov.remove();
|
||||
|
||||
const TDate datadoc(m.get_date(F_DATAREG));
|
||||
TDocumento doc('D', datadoc.year(), m.get(F_CODNUM), 0L);
|
||||
TVB_recset s(file, ',');
|
||||
|
||||
TProgind pi(s.items(),"Importazione fatture in corso ...",true,true);
|
||||
|
||||
_configfile->set_paragraph("Transaction"); //setto il paragrafo [Transaction] del file ini
|
||||
_configfile->set("Action","INSERT");
|
||||
_configfile->set("Mode","AUTO");
|
||||
_configfile->set_paragraph("23"); //setto il paragrafo [23] del file ini (testata)
|
||||
_configfile->set(MOV_NUMREG, numreg);
|
||||
_configfile->set("SOLAIVA", "");
|
||||
_configfile->set(MOV_TIPO, 'F');
|
||||
_configfile->set(MOV_CODCF, _msk->get(F_CODCF));
|
||||
_configfile->set(MOV_DATACOMP, _msk->get_date(F_DATAREG));
|
||||
_configfile->set(MOV_DATAREG, _msk->get_date(F_DATAREG));
|
||||
doc.put(DOC_TIPODOC, m.get(F_TIPODOC));
|
||||
doc.put(DOC_TIPOCF, "F");
|
||||
doc.put(DOC_CODCF, m.get(F_CODCF));
|
||||
doc.put(DOC_DATADOC, datadoc);
|
||||
|
||||
int nriga = 1;
|
||||
real totimponibile = ZERO;
|
||||
real totimposta = ZERO;
|
||||
const TString16 codiva = _msk->get(F_CODIVA);
|
||||
const real iva = cache().get("%IVA", codiva, "R0");
|
||||
const int anno = _msk->get_date(F_DATAREG).year();
|
||||
|
||||
TString caus = _msk->get(F_CODCAU);
|
||||
|
||||
_configfile->set(MOV_CODCAUS, caus);
|
||||
|
||||
TToken_string key(caus);
|
||||
key.add("1");
|
||||
const TRectype& causale = cache().get(LF_RCAUSALI, key);
|
||||
|
||||
const real spese = _msk->get_real(F_SPESE);
|
||||
bool has_spese = ! spese.is_zero();
|
||||
TGeneric_distrib d(spese, 2);
|
||||
|
||||
if (has_spese)
|
||||
{
|
||||
for (bool ok = s.move_first(); ok; ok = s.move_next())
|
||||
{
|
||||
if (!pi.addstatus(1))
|
||||
break;
|
||||
TString16 codcom = s.get(0).as_string();
|
||||
|
||||
if(codcom.empty())
|
||||
continue;
|
||||
|
||||
TString16 tmp = s.get(1).as_string();
|
||||
tmp.strip(".");
|
||||
tmp.replace(',', '.');
|
||||
|
||||
real imp(tmp); imp.round(2);
|
||||
d.add(imp);
|
||||
}
|
||||
}
|
||||
TSpesa_prest p("GENPR", 'P');
|
||||
|
||||
for (bool ok = s.move_first(); ok; ok = s.move_next())
|
||||
{
|
||||
if (!pi.addstatus(1))
|
||||
break;
|
||||
|
||||
TString8 paragraph;
|
||||
paragraph.format("%d,%d", LF_RMOVIVA, nriga++);
|
||||
_configfile->set_paragraph(paragraph);
|
||||
TRiga_documento & row = doc.new_row("06");
|
||||
|
||||
TString16 codcom = s.get(0).as_string();
|
||||
if(codcom.empty())
|
||||
continue;
|
||||
TString16 tmp = s.get(1).as_string();
|
||||
tmp.strip(".");
|
||||
tmp.replace(',', '.');
|
||||
real imp(tmp); imp.round(2);
|
||||
row.put(RDOC_CODART, p.codice());
|
||||
row.put(RDOC_CHECKED, "X");
|
||||
TString16 tmp = s.get(1).as_string();
|
||||
|
||||
if (has_spese)
|
||||
imp += d.get();
|
||||
totimponibile += imp;
|
||||
tmp.strip(".");
|
||||
tmp.replace(',', '.');
|
||||
|
||||
TCommessa cms(codcom);
|
||||
real imp(tmp); imp.round(doc.decimals());
|
||||
|
||||
row.put(RDOC_QTA, 1);
|
||||
row.put(RDOC_UMQTA, p.um());
|
||||
row.put(RDOC_PREZZO, imp),
|
||||
row.put(RDOC_CODIVA, p.cod_iva());
|
||||
|
||||
const TString16 codcom = s.get(0).as_string();
|
||||
TCommessa cms(codcom);
|
||||
TCommessa_string ankey = cms.cmsstr();
|
||||
TBill co(ankey.gruppo(), ankey.conto(), ankey.sotco());
|
||||
TString descr;
|
||||
|
||||
if(co.is_analitico())
|
||||
{
|
||||
if(righean.is_key(ankey))
|
||||
{
|
||||
real& imponibile = *(real*)righean.objptr(ankey);
|
||||
imponibile += imp;
|
||||
}
|
||||
else
|
||||
righean.add(ankey, imp);
|
||||
}
|
||||
descr << " Id. Lavoro " << codcom;
|
||||
|
||||
row.put(RDOC_DESCR, descr);
|
||||
row.put(RDOC_CODCMS, codcom);
|
||||
row.put(RDOC_QTAGG1, ankey.gruppo());
|
||||
row.put(RDOC_QTAGG2, ankey.conto());
|
||||
row.put(RDOC_QTAGG3, ankey.sotco());
|
||||
}
|
||||
TString16 codsp = m.get(F_CODSP1);
|
||||
real perc = m.get(F_PERCSP1);
|
||||
|
||||
real rimposta = imp * iva / CENTO; rimposta.round(2);
|
||||
totimposta += rimposta;
|
||||
add_spesa(doc, codsp, perc);
|
||||
codsp = m.get(F_CODSP2);
|
||||
perc = m.get_real(F_PERCSP2);
|
||||
add_spesa(doc, codsp, perc);
|
||||
codsp = m.get(F_CODSP3);
|
||||
perc = m.get_real(F_PERCSP3);
|
||||
add_spesa(doc, codsp, perc);
|
||||
|
||||
_configfile->set(RMI_ANNOES, anno);
|
||||
_configfile->set(RMI_IMPONIBILE, imp.string());
|
||||
_configfile->set(RMI_CODIVA, codiva);
|
||||
_configfile->set(RMI_IMPOSTA, rimposta.string());
|
||||
_configfile->set(RMI_GRUPPO, ankey.gruppo());
|
||||
_configfile->set(RMI_CONTO, ankey.conto());
|
||||
_configfile->set(RMI_SOTTOCONTO, ankey.sotco());
|
||||
_configfile->set(RMI_TIPOATT, 1);
|
||||
}
|
||||
|
||||
const real totdoc = totimponibile + totimposta;
|
||||
TImporto importo(causale.get("SEZIONE")[0], totdoc);
|
||||
|
||||
TString8 paragraph;
|
||||
paragraph.format("%d,%d", LF_RMOV, 1);
|
||||
_configfile->set_paragraph(paragraph);
|
||||
_configfile->set(RMV_NUMRIG, 1);
|
||||
_configfile->set(RMV_ANNOES, anno);
|
||||
_configfile->set(RMV_SEZIONE, causale.get("SEZIONE"));
|
||||
_configfile->set(RMV_IMPORTO, importo.valore().string());
|
||||
_configfile->set(RMV_GRUPPO, causale.get("GRUPPO"));
|
||||
_configfile->set(RMV_CONTO, causale.get("CONTO"));
|
||||
_configfile->set(RMV_SOTTOCONTO, _msk->get_long(F_CODCF));
|
||||
_configfile->set(RMV_TIPOC, "F");
|
||||
_configfile->set(RMV_ROWTYPE, "T");
|
||||
|
||||
_configfile->set_paragraph("23");
|
||||
_configfile->set(MOV_TOTDOC, totdoc.string());
|
||||
|
||||
_configfile->set_paragraph("Transaction");
|
||||
|
||||
return true;
|
||||
return doc.write() == NOERR;
|
||||
}
|
||||
|
||||
const char* nomeini = "ps0713300fatt.ini";
|
||||
@ -274,9 +144,8 @@ const char* nomeini = "ps0713300fatt.ini";
|
||||
bool TImporta_fatacq_app::create()
|
||||
{
|
||||
xvt_fsys_remove_file(nomeini);
|
||||
_configfile = new TConfig(nomeini);
|
||||
|
||||
_msk = new TImporta_fatacq_msk();
|
||||
_msk = new TImporta_fatacq_msk();
|
||||
|
||||
return TSkeleton_application::create();
|
||||
}
|
||||
@ -284,34 +153,19 @@ bool TImporta_fatacq_app::create()
|
||||
bool TImporta_fatacq_app::destroy()
|
||||
{
|
||||
delete _msk;
|
||||
delete _configfile;
|
||||
return TApplication::destroy();
|
||||
}
|
||||
|
||||
void TImporta_fatacq_app::main_loop()
|
||||
{
|
||||
KEY tasto;
|
||||
tasto = _msk->run();
|
||||
if (tasto == K_ENTER)
|
||||
if (_msk->run() == K_ENTER)
|
||||
{
|
||||
|
||||
//genero il nome del file da caricare
|
||||
TFilename name = _msk->get(F_PATH);
|
||||
TFilename tmp = _msk->get(F_NAME);
|
||||
name.add(tmp.name());
|
||||
TAssoc_array righean;
|
||||
const long numreg = genera_movcg();
|
||||
if (transfer(name, numreg, righean))
|
||||
{
|
||||
genera_analitica(numreg, righean);
|
||||
|
||||
TString app;
|
||||
app << "cg2 -0 -i" << nomeini;
|
||||
TExternal_app primanota(app);
|
||||
primanota.run();
|
||||
|
||||
message_box(TR("Importazione fatture completata"));
|
||||
}
|
||||
//genero il nome del file da caricare
|
||||
TFilename name = _msk->get(F_PATH);
|
||||
TFilename tmp = _msk->get(F_NAME);
|
||||
name.add(tmp.name());
|
||||
if (get_doc(name, *_msk))
|
||||
message_box(TR("Importazione fatture completata"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,11 +1,19 @@
|
||||
//campi maschera ps0713300a
|
||||
#define F_PATH 101
|
||||
#define F_NAME 102
|
||||
#define F_CODIVA 103
|
||||
#define F_DESIVA 104
|
||||
#define F_CODCAU 105
|
||||
#define F_DESCAU 106
|
||||
#define F_CODNUM 103
|
||||
#define F_DESNUM 104
|
||||
#define F_TIPODOC 105
|
||||
#define F_DESTIPODOC 106
|
||||
#define F_CODCF 107
|
||||
#define F_FRAGSOC 108
|
||||
#define F_DATAREG 109
|
||||
#define F_SPESE 110
|
||||
#define F_CODSP1 110
|
||||
#define F_DESCRSP1 111
|
||||
#define F_PERCSP1 112
|
||||
#define F_CODSP2 113
|
||||
#define F_DESCRSP2 114
|
||||
#define F_PERCSP2 115
|
||||
#define F_CODSP3 116
|
||||
#define F_DESCRSP3 117
|
||||
#define F_PERCSP3 118
|
||||
|
@ -10,9 +10,8 @@ PAGE "Importazione fatture" 0 0 0 0
|
||||
|
||||
STRING DLG_PROFILE 50
|
||||
BEGIN
|
||||
PROMPT 9 -12 "Profilo "
|
||||
PROMPT 9 -2 "Profilo "
|
||||
PSELECT
|
||||
FLAGS "H"
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 90 4
|
||||
@ -36,68 +35,65 @@ BEGIN
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 90 7
|
||||
GROUPBOX DLG_NULL 90 9
|
||||
BEGIN
|
||||
PROMPT 1 5 "@bParametri per l'importazione"
|
||||
END
|
||||
|
||||
STRING F_CODIVA 4
|
||||
STRING F_CODNUM 4
|
||||
BEGIN
|
||||
PROMPT 2 6 "Codice IVA "
|
||||
USE %IVA
|
||||
INPUT CODTAB F_CODIVA
|
||||
DISPLAY "Codice " CODTAB
|
||||
PROMPT 2 6 "Numerazione"
|
||||
HELP "Codice numerazione"
|
||||
USE %NUM
|
||||
INPUT CODTAB F_CODNUM
|
||||
DISPLAY "Codice" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT F_CODIVA CODTAB
|
||||
OUTPUT F_DESIVA S0
|
||||
OUTPUT F_CODNUM CODTAB
|
||||
OUTPUT F_DESNUM S0
|
||||
CHECKTYPE REQUIRED
|
||||
FLAG "UPA"
|
||||
WARNING "Numerazione assente"
|
||||
END
|
||||
|
||||
STRING F_DESIVA 50
|
||||
STRING F_DESNUM 50
|
||||
BEGIN
|
||||
PROMPT 25 6 "Descrizione "
|
||||
USE %IVA KEY 2
|
||||
INPUT S0 F_DESIVA
|
||||
PROMPT 25 6 "Descrizione "
|
||||
HELP "Descrizione numerazione"
|
||||
USE %NUM KEY 2
|
||||
INPUT S0 F_DESNUM
|
||||
DISPLAY "Descrizione@60" S0
|
||||
DISPLAY "Codice" CODTAB
|
||||
COPY OUTPUT F_CODNUM
|
||||
END
|
||||
|
||||
STRING F_TIPODOC 4
|
||||
BEGIN
|
||||
PROMPT 2 7 "Tipo "
|
||||
HELP "Codice tipo documento"
|
||||
USE %TIP
|
||||
INPUT CODTAB F_TIPODOC
|
||||
DISPLAY "Codice" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
DISPLAY "Codice " CODTAB
|
||||
COPY OUTPUT F_CODIVA
|
||||
CHECKTYPE NORMAL
|
||||
OUTPUT F_TIPODOC CODTAB
|
||||
OUTPUT F_DESTIPODOC S0
|
||||
CHECKTYPE REQUIRED
|
||||
FLAG "UP"
|
||||
END
|
||||
|
||||
STRING F_CODCAU 3
|
||||
STRING F_DESTIPODOC 50
|
||||
BEGIN
|
||||
PROMPT 2 7 "Causale "
|
||||
FIELD CODCAU
|
||||
FLAGS "UZ"
|
||||
USE LF_CAUSALI
|
||||
INPUT CODCAUS F_CODCAU
|
||||
DISPLAY "Cod." CODCAUS
|
||||
DISPLAY "Descrizione@50" DESCR
|
||||
DISPLAY "Documento" TIPODOC
|
||||
DISPLAY "Registro" REG
|
||||
DISPLAY "Tipo movimento" TIPOMOV
|
||||
OUTPUT F_CODCAU CODCAUS
|
||||
OUTPUT F_DESCAU DESCR
|
||||
CHECKTYPE REQUIRED
|
||||
PROMPT 25 7 "Descrizione "
|
||||
HELP "Descrizione tipo documento"
|
||||
USE %TIP KEY 2
|
||||
INPUT S0 F_DESTIPODOC
|
||||
DISPLAY "Descrizione@60" S0
|
||||
DISPLAY "Codice" CODTAB
|
||||
COPY OUTPUT F_TIPODOC
|
||||
END
|
||||
|
||||
STRING F_DESCAU 50
|
||||
|
||||
STRING F_CODCF 4
|
||||
BEGIN
|
||||
PROMPT 25 7 "Descrizione "
|
||||
FIELD DESCR
|
||||
USE LF_CAUSALI KEY 2
|
||||
INPUT DESCR F_DESCAU
|
||||
DISPLAY "Descrizione @50" DESCR
|
||||
DISPLAY "Cod." CODCAUS
|
||||
DISPLAY "Documento" TIPODOC
|
||||
DISPLAY "Registro" REG
|
||||
DISPLAY "Movimento" TIPOMOV
|
||||
COPY OUTPUT F_CODCAU
|
||||
END
|
||||
|
||||
STRING F_CODCF 4
|
||||
BEGIN
|
||||
PROMPT 2 8 "Fornitore "
|
||||
PROMPT 2 8 "Fornitore "
|
||||
FLAG "UR"
|
||||
USE LF_CLIFO
|
||||
INPUT TIPOCF "F"
|
||||
@ -109,9 +105,9 @@ BEGIN
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
STRING F_FRAGSOC 50 24
|
||||
STRING F_FRAGSOC 50
|
||||
BEGIN
|
||||
PROMPT 25 8 "Ragione Sociale "
|
||||
PROMPT 25 8 "Ragione Soc."
|
||||
USE LF_CLIFO KEY 2
|
||||
INPUT TIPOCF "F"
|
||||
INPUT RAGSOC F_FRAGSOC
|
||||
@ -122,13 +118,91 @@ END
|
||||
|
||||
DATE F_DATAREG
|
||||
BEGIN
|
||||
PROMPT 2 9 "Data registrazione "
|
||||
PROMPT 2 9 "Data reg. ."
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
CURRENCY F_SPESE
|
||||
STRING F_CODSP1 8
|
||||
BEGIN
|
||||
PROMPT 2 10 "Spese "
|
||||
PROMPT 2 10 "Spesa 1 "
|
||||
USE SPP SELECT S6=="P"
|
||||
INPUT CODTAB F_CODSP1
|
||||
DISPLAY "Codice spesa" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT F_CODSP1 CODTAB
|
||||
OUTPUT F_DESCRSP1 S0
|
||||
OUTPUT F_PERCSP1 R2
|
||||
FLAGS "U"
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
STRING F_DESCRSP1 50 35
|
||||
BEGIN
|
||||
PROMPT 25 10 "Descrizione "
|
||||
USE SPP KEY 2 SELECT S6=="P"
|
||||
INPUT S0 F_DESCRSP1
|
||||
DISPLAY "Descrizione@50" S0
|
||||
DISPLAY "Codice spesa" CODTAB
|
||||
COPY OUTPUT F_CODSP1
|
||||
END
|
||||
|
||||
NUMBER F_PERCSP1 6 2
|
||||
BEGIN
|
||||
PROMPT 74 10 "Perc. "
|
||||
END
|
||||
|
||||
STRING F_CODSP2 8
|
||||
BEGIN
|
||||
PROMPT 2 11 "Spesa 2 "
|
||||
COPY USE F_CODSP1
|
||||
INPUT CODTAB F_CODSP2
|
||||
COPY DISPLAY F_CODSP1
|
||||
OUTPUT F_CODSP2 CODTAB
|
||||
OUTPUT F_DESCRSP2 S0
|
||||
OUTPUT F_PERCSP2 R2
|
||||
FLAGS "U"
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
STRING F_DESCRSP2 50 35
|
||||
BEGIN
|
||||
PROMPT 25 11 "Descrizione "
|
||||
COPY USE F_DESCRSP1
|
||||
INPUT S0 F_DESCRSP2
|
||||
COPY DISPLAY F_DESCRSP1
|
||||
COPY OUTPUT F_CODSP2
|
||||
END
|
||||
|
||||
NUMBER F_PERCSP2 6 2
|
||||
BEGIN
|
||||
PROMPT 74 11 "Perc. "
|
||||
END
|
||||
|
||||
STRING F_CODSP3 8
|
||||
BEGIN
|
||||
PROMPT 2 12 "Spesa 3 "
|
||||
COPY USE F_CODSP1
|
||||
INPUT CODTAB F_CODSP3
|
||||
COPY DISPLAY F_CODSP1
|
||||
OUTPUT F_CODSP3 CODTAB
|
||||
OUTPUT F_DESCRSP3 S0
|
||||
OUTPUT F_PERCSP3 R2
|
||||
FLAGS "U"
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
STRING F_DESCRSP3 50 35
|
||||
BEGIN
|
||||
PROMPT 25 12 "Descrizione "
|
||||
COPY USE F_DESCRSP1
|
||||
INPUT S0 F_DESCRSP3
|
||||
COPY DISPLAY F_DESCRSP1
|
||||
COPY OUTPUT F_CODSP3
|
||||
END
|
||||
|
||||
NUMBER F_PERCSP3 6 2
|
||||
BEGIN
|
||||
PROMPT 74 12 "Perc. "
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
Loading…
x
Reference in New Issue
Block a user