Patch level : 2.2 66
Files correlati : ve1.exe Ricompilazione Demo : [ ] Commento : spostato il messaggio ditta (MESSAGE_DITTA o FIRM ) nei report git-svn-id: svn://10.65.10.50/trunk@12880 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
1ba41a0b48
commit
8200acbd8b
@ -21,10 +21,6 @@
|
||||
DOC_CLIENTE \ user defined word in ve1.exe
|
||||
;
|
||||
|
||||
: MESSAGE_DITTA ( s1 -- )
|
||||
DOC_DITTA \ user defined word in ve1.exe
|
||||
;
|
||||
|
||||
: MESSAGE_PARENTDOC ( [b1] s1 n1 -- )
|
||||
DOC_PARENT_DOC \ user defined word in ve1.exe
|
||||
;
|
||||
|
124
ve/ve1300.cpp
124
ve/ve1300.cpp
@ -160,7 +160,7 @@ TDoc_recordset::~TDoc_recordset()
|
||||
class TReport_doc : public TReport
|
||||
{
|
||||
size_t _first_msg;
|
||||
TRelation _firmrel;
|
||||
// TRelation _firmrel;
|
||||
|
||||
protected:
|
||||
virtual void include_libraries(bool reload);
|
||||
@ -173,7 +173,6 @@ protected:
|
||||
void reset_values(const TString& output);
|
||||
|
||||
bool msg_cliente(TVariant_stack& stack);
|
||||
bool msg_ditta(TVariant_stack& stack);
|
||||
bool msg_parent_doc(TVariant_stack& stack);
|
||||
bool msg_parent_row(TVariant_stack& stack);
|
||||
bool msg_riepilogo_iva(TVariant_stack& stack);
|
||||
@ -360,100 +359,6 @@ bool TReport_doc::msg_cliente(TVariant_stack& stack)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool TReport_doc::msg_ditta(TVariant_stack& stack)
|
||||
{
|
||||
TReport_field& cf = *curr_field();
|
||||
TString in = stack.pop().as_string();
|
||||
TString valore;
|
||||
if (in[0]!='!')
|
||||
{
|
||||
cf.set(_firmrel.curr().get(in));
|
||||
return true;
|
||||
}
|
||||
in.ltrim(1);
|
||||
const bool is_fisc = _firmrel.curr(LF_ANAG).get("INDRF").not_empty();
|
||||
|
||||
if (in=="RAGSOC")
|
||||
{
|
||||
valore = _firmrel.curr().get(NDT_RAGSOC);
|
||||
cf.set(valore);
|
||||
return true;
|
||||
}
|
||||
if (in=="IND")
|
||||
{
|
||||
valore = _firmrel.curr(LF_ANAG).get(is_fisc ? "INDRF" : "INDRES");
|
||||
cf.set(valore);
|
||||
return true;
|
||||
}
|
||||
if (in=="NUM")
|
||||
{
|
||||
valore = _firmrel.curr(LF_ANAG).get(is_fisc ? "CIVRF" : "CIVRES");
|
||||
cf.set(valore);
|
||||
return true;
|
||||
}
|
||||
if (in=="CAP")
|
||||
{
|
||||
valore = _firmrel.curr(LF_ANAG).get(is_fisc ? "CAPRF" : "CAPRES");
|
||||
cf.set(valore);
|
||||
return true;
|
||||
}
|
||||
if (in=="COM")
|
||||
{
|
||||
valore = _firmrel.curr(is_fisc ? -213 : -113).get(COM_DENCOM);
|
||||
cf.set(valore);
|
||||
return true;
|
||||
}
|
||||
if (in=="PROV")
|
||||
{
|
||||
valore = _firmrel.curr(is_fisc ? -213 : -113).get(COM_PROVCOM);
|
||||
cf.set(valore);
|
||||
return true;
|
||||
}
|
||||
if (in=="IVA")
|
||||
{
|
||||
cf.set(_firmrel.curr(LF_ANAG).get("PAIV"));
|
||||
return true;
|
||||
}
|
||||
if (in=="CF")
|
||||
{
|
||||
cf.set(_firmrel.curr(LF_ANAG).get("COFI"));
|
||||
return true;
|
||||
}
|
||||
if (in=="TEL")
|
||||
{
|
||||
valore = _firmrel.lfile().get("PTEL");
|
||||
valore << "/" << _firmrel.lfile().get("TEL");
|
||||
cf.set(valore);
|
||||
return true;
|
||||
}
|
||||
if (in=="FAX")
|
||||
{
|
||||
valore = _firmrel.lfile().get("PFAX");
|
||||
valore << "/" << _firmrel.lfile().get("FAX");
|
||||
cf.set(valore);
|
||||
return true;
|
||||
}
|
||||
if (in=="REGSOC")
|
||||
{
|
||||
valore = _firmrel[LF_UNLOC].get("REGIMP");
|
||||
valore.insert(" ", 2); valore.insert(" ", 6);
|
||||
valore.insert(" ", 11); valore.insert(" ", 21);
|
||||
valore.insert("Reg.Imp. ", 0);
|
||||
cf.set(valore);
|
||||
return true;
|
||||
}
|
||||
if (in=="CCIAA")
|
||||
{
|
||||
valore = _firmrel[LF_UNLOC].get("NUMCCIAA");
|
||||
const TString & data = _firmrel[LF_UNLOC].get("DATAICCIAA");
|
||||
if (data.not_empty())
|
||||
valore << " del " << data;
|
||||
cf.set(valore);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void TReport_doc::output_values(const TRectype& rec, const TString& output)
|
||||
{
|
||||
TToken_string out(output, '!');
|
||||
@ -670,7 +575,6 @@ size_t TReport_doc::get_usr_words(TString_array& words) const
|
||||
const char* const name[] =
|
||||
{
|
||||
"DOC_CLIENTE",
|
||||
"DOC_DITTA",
|
||||
"DOC_PARENT_DOC", "DOC_PARENT_ROW",
|
||||
"DOC_RIEPILOGO_IVA",
|
||||
"DOC_SCADENZE",
|
||||
@ -694,12 +598,11 @@ bool TReport_doc::execute_usr_word(unsigned int opcode, TVariant_stack& stack)
|
||||
switch (opcode)
|
||||
{
|
||||
case 0 : msg_cliente(stack); break;
|
||||
case 1 : msg_ditta(stack); break;
|
||||
case 2 : msg_parent_doc(stack); break;
|
||||
case 3 : msg_parent_row(stack); break;
|
||||
case 4 : msg_riepilogo_iva(stack); break;
|
||||
case 5 : msg_scadenze(stack); break;
|
||||
case 6 : msg_tot_imponibili(stack); break;
|
||||
case 1 : msg_parent_doc(stack); break;
|
||||
case 2 : msg_parent_row(stack); break;
|
||||
case 3 : msg_riepilogo_iva(stack); break;
|
||||
case 4 : msg_scadenze(stack); break;
|
||||
case 5 : msg_tot_imponibili(stack); break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
@ -716,15 +619,16 @@ void TReport_doc::include_libraries(bool reload)
|
||||
}
|
||||
|
||||
TReport_doc::TReport_doc(const char* name)
|
||||
: _firmrel(LF_NDITTE)
|
||||
// : _firmrel(LF_NDITTE)
|
||||
{
|
||||
// istanziamento e impostazione della relazione di gestione della ditta corrente
|
||||
_firmrel.add(LF_ANAG, "TIPOA=TIPOA|CODANAGR=CODANAGR");
|
||||
_firmrel.add(LF_UNLOC,"CODDITTA=CODDITTA"); // si posiziona sulla prima unita' locale della ditta
|
||||
_firmrel.add(LF_COMUNI, "STATO=STATORES|COM=COMRES", 1, LF_ANAG, 100+LF_COMUNI);
|
||||
_firmrel.add(LF_COMUNI, "STATO=STATORES|COM=COMRF", 1, LF_ANAG, 200+LF_COMUNI);
|
||||
_firmrel.curr().put(NDT_CODDITTA, prefix().get_codditta());
|
||||
_firmrel.read();
|
||||
// _firmrel.add(LF_ANAG, "TIPOA=TIPOA|CODANAGR=CODANAGR");
|
||||
// _firmrel.add(LF_UNLOC,"CODDITTA=CODDITTA"); // si posiziona sulla prima unita' locale della ditta//
|
||||
// _firmrel.add(LF_COMUNI, "COM=STATORES+COMRES", 1, LF_ANAG, 100+LF_COMUNI);
|
||||
// _firmrel.add(LF_COMUNI, "COM=STATORES+COMRF", 1, LF_ANAG, 200+LF_COMUNI);
|
||||
// _firmrel.curr().put(NDT_CODDITTA, prefix().get_codditta());
|
||||
// _firmrel.read();
|
||||
|
||||
|
||||
load(name); // Faccio la load altrimenti non include la libreria 1300.alx
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user