Cosmesi minore
git-svn-id: svn://10.65.10.50/branches/R_10_00@22965 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
6fd0afb1bc
commit
574734d8a8
@ -1406,9 +1406,7 @@ void TStampaDoc_application::print_selected(KEY k)
|
|||||||
}
|
}
|
||||||
|
|
||||||
pr.open();
|
pr.open();
|
||||||
TProgind* pi = pr.printtype() != screenvis ?
|
TProgress_monitor* pi = pr.printtype() != screenvis ? new TProgress_monitor(cur.items(), TR("Stampa documenti in corso..."),false) : NULL;
|
||||||
new TProgind(cur.items(), TR("Stampa documenti in corso..."),false,true) :
|
|
||||||
NULL;
|
|
||||||
if (!_is_lista)
|
if (!_is_lista)
|
||||||
{
|
{
|
||||||
cur.setregion(darec, arec);
|
cur.setregion(darec, arec);
|
||||||
@ -1646,28 +1644,30 @@ void TStampaDoc_application::set_filter(TDocumento_form& frm)
|
|||||||
for (int j=0; j<rows; j++)
|
for (int j=0; j<rows; j++)
|
||||||
{
|
{
|
||||||
TToken_string& riga = sf.row(j);
|
TToken_string& riga = sf.row(j);
|
||||||
sw = riga.get(0);sw.trim();
|
sw = riga.get(0); sw.trim();
|
||||||
if (riga.empty_items() || sw.empty())
|
if (riga.empty_items() || sw.empty())
|
||||||
break; // Interrompe alla prima riga vuota...
|
break; // Interrompe alla prima riga vuota...
|
||||||
|
|
||||||
|
|
||||||
e1.format("((CODNUM==\"%s\")", (const char*)sw);
|
e1.format("((CODNUM==\"%s\")", (const char*)sw);
|
||||||
|
|
||||||
TString4 td = riga.get(1);td.trim();
|
TString4 td = riga.get(1);
|
||||||
if (td.not_empty())
|
if (td.full())
|
||||||
{
|
e1 << "&&(TIPODOC==\"" << td.trim() <<"\")";
|
||||||
e1 << "&&(TIPODOC==\"" << td <<"\")";
|
|
||||||
}
|
const long da_ndoc = riga.get_long(2);
|
||||||
|
const long a_ndoc = riga.get_long(3);
|
||||||
|
if (da_ndoc > 0 || a_ndoc > 0)
|
||||||
|
e1 << "&&(BETWEEN(NDOC," << da_ndoc << "," << a_ndoc << "))";
|
||||||
|
|
||||||
e2 = "";
|
e2 = "";
|
||||||
for (int k=2; k<=7; k++) // Famme vede' li stati generali... Aho' A BURINO! Che e' la Rivoluzione Francese?
|
for (int k=4; k<=7; k++) // Famme vede' li stati generali... Aho' A BURINO! Che e' la Rivoluzione Francese?
|
||||||
{
|
{
|
||||||
const char c = riga.get_char(k);
|
const char c = riga.get_char(k);
|
||||||
if (c <= ' ')
|
if (c <= ' ')
|
||||||
break; // Interrompe al primo blank...
|
break; // Interrompe al primo blank...
|
||||||
e2.format("(STATO==\"%c\")",c);
|
e2.format("(STATO==\"%c\")",c);
|
||||||
// Se k vale 3 o piu' significa ke gli stati prec erano != "" no!?
|
// Se k vale 3 o piu' significa ke gli stati prec erano != "" no!?
|
||||||
if (k == 2)
|
if (k == 4)
|
||||||
e1 << "&&(";
|
e1 << "&&(";
|
||||||
else
|
else
|
||||||
e1 << "||";
|
e1 << "||";
|
||||||
|
@ -24,14 +24,14 @@ END
|
|||||||
SPREADSHEET F_SHEETNUMS 78 8
|
SPREADSHEET F_SHEETNUMS 78 8
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 2 ""
|
PROMPT 1 2 ""
|
||||||
ITEM "Cod. num."
|
ITEM "Cod.\nnum.@4"
|
||||||
ITEM "Tipo doc."
|
ITEM "Tipo\ndoc.@4"
|
||||||
|
ITEM "Da doc.\nnumero@7"
|
||||||
|
ITEM "A doc.\nnumero@7"
|
||||||
ITEM "Stato 1"
|
ITEM "Stato 1"
|
||||||
ITEM "Stato 2"
|
ITEM "Stato 2"
|
||||||
ITEM "Stato 3"
|
ITEM "Stato 3"
|
||||||
ITEM "Stato 4"
|
ITEM "Stato 4"
|
||||||
ITEM "Stato 5"
|
|
||||||
ITEM "Stato 6"
|
|
||||||
END
|
END
|
||||||
|
|
||||||
|
|
||||||
@ -145,31 +145,19 @@ BEGIN
|
|||||||
FLAGS "UB"
|
FLAGS "UB"
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING 103 1
|
NUMBER 103 7
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 3 "Stato 1 "
|
PROMPT 1 3 "Da numero doc. "
|
||||||
USE %STD
|
|
||||||
INPUT CODTAB 103
|
|
||||||
DISPLAY "Stato" CODTAB
|
|
||||||
DISPLAY "Descrizione@50" S0
|
|
||||||
OUTPUT 103 CODTAB
|
|
||||||
CHECKTYPE NORMAL
|
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING 104 1
|
NUMBER 104 7
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 4 "Stato 2 "
|
PROMPT 1 4 "A numero doc. "
|
||||||
USE %STD
|
|
||||||
INPUT CODTAB 104
|
|
||||||
DISPLAY "Stato" CODTAB
|
|
||||||
DISPLAY "Descrizione@50" S0
|
|
||||||
OUTPUT 104 CODTAB
|
|
||||||
CHECKTYPE NORMAL
|
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING 105 1
|
STRING 105 1
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 5 "Stato 3 "
|
PROMPT 1 5 "Stato 1 "
|
||||||
USE %STD
|
USE %STD
|
||||||
INPUT CODTAB 105
|
INPUT CODTAB 105
|
||||||
DISPLAY "Stato" CODTAB
|
DISPLAY "Stato" CODTAB
|
||||||
@ -180,33 +168,30 @@ END
|
|||||||
|
|
||||||
STRING 106 1
|
STRING 106 1
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 6 "Stato 4 "
|
PROMPT 1 6 "Stato 2 "
|
||||||
USE %STD
|
COPY USE 105
|
||||||
INPUT CODTAB 106
|
INPUT CODTAB 106
|
||||||
DISPLAY "Stato" CODTAB
|
COPY DISPLAY 105
|
||||||
DISPLAY "Descrizione@50" S0
|
|
||||||
OUTPUT 106 CODTAB
|
OUTPUT 106 CODTAB
|
||||||
CHECKTYPE NORMAL
|
CHECKTYPE NORMAL
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING 107 1
|
STRING 107 1
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 7 "Stato 5 "
|
PROMPT 1 7 "Stato 3 "
|
||||||
USE %STD
|
COPY USE 105
|
||||||
INPUT CODTAB 107
|
INPUT CODTAB 107
|
||||||
DISPLAY "Stato" CODTAB
|
COPY DISPLAY 105
|
||||||
DISPLAY "Descrizione@50" S0
|
|
||||||
OUTPUT 107 CODTAB
|
OUTPUT 107 CODTAB
|
||||||
CHECKTYPE NORMAL
|
CHECKTYPE NORMAL
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING 108 1
|
STRING 108 1
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 8 "Stato 6 "
|
PROMPT 1 8 "Stato 4 "
|
||||||
USE %STD
|
COPY USE 105
|
||||||
INPUT CODTAB 108
|
INPUT CODTAB 108
|
||||||
DISPLAY "Stato" CODTAB
|
COPY DISPLAY 105
|
||||||
DISPLAY "Descrizione@50" S0
|
|
||||||
OUTPUT 108 CODTAB
|
OUTPUT 108 CODTAB
|
||||||
CHECKTYPE NORMAL
|
CHECKTYPE NORMAL
|
||||||
END
|
END
|
||||||
|
@ -747,6 +747,8 @@ protected:
|
|||||||
void dirty_tabella_iva() { _tabella_iva.destroy();}
|
void dirty_tabella_iva() { _tabella_iva.destroy();}
|
||||||
static void test_firm();
|
static void test_firm();
|
||||||
|
|
||||||
|
virtual void on_read(int err, word lockop); // Inizializzazioni comuni post lettura record
|
||||||
|
|
||||||
void init();
|
void init();
|
||||||
void check_modules();
|
void check_modules();
|
||||||
virtual void set_variables(TExpression * e) const ;
|
virtual void set_variables(TExpression * e) const ;
|
||||||
@ -780,7 +782,7 @@ public:
|
|||||||
void sort_rows(const char * key);
|
void sort_rows(const char * key);
|
||||||
|
|
||||||
int physical_rows() const { return body().rows(); }
|
int physical_rows() const { return body().rows(); }
|
||||||
virtual int rows() const { return physical_rows() + ((_sconto != NULL) ? 1 : 0) + ((_esenzione != NULL) ? 1 : 0); }
|
virtual int rows() const { return physical_rows() + (ha_riga_sconto() ? 1 : 0) + (ha_riga_esenzione() ? 1 : 0); }
|
||||||
const TRiga_documento& operator[](int index) const { return (const TRiga_documento&)((TDocumento *)this)->row(index); }
|
const TRiga_documento& operator[](int index) const { return (const TRiga_documento&)((TDocumento *)this)->row(index); }
|
||||||
TRiga_documento& operator[](int index) { return (TRiga_documento&)row(index); }
|
TRiga_documento& operator[](int index) { return (TRiga_documento&)row(index); }
|
||||||
|
|
||||||
@ -790,7 +792,8 @@ public:
|
|||||||
TRiga_documento& insert_row(int row, const char *tipo = NULL);
|
TRiga_documento& insert_row(int row, const char *tipo = NULL);
|
||||||
TRiga_documento& new_row(const char *tipo = NULL);
|
TRiga_documento& new_row(const char *tipo = NULL);
|
||||||
virtual int read(TBaseisamfile& f, word op = _isequal, word lockop = _nolock);
|
virtual int read(TBaseisamfile& f, word op = _isequal, word lockop = _nolock);
|
||||||
virtual int write(TBaseisamfile& f) const { return write_rewrite(f, FALSE); }
|
virtual int readat(TBaseisamfile& file, TRecnotype nrec, word lockop = _nolock);
|
||||||
|
virtual int write(TBaseisamfile& f) const { return write_rewrite(f, false); }
|
||||||
virtual int rewrite(TBaseisamfile& f) const { return write_rewrite(f, true); }
|
virtual int rewrite(TBaseisamfile& f) const { return write_rewrite(f, true); }
|
||||||
virtual int remove(TBaseisamfile& f) const;
|
virtual int remove(TBaseisamfile& f) const;
|
||||||
|
|
||||||
|
@ -768,10 +768,8 @@ TRiga_documento& TDocumento::new_row(const char *tipo)
|
|||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
int TDocumento::read(TBaseisamfile& f, word op, word lockop)
|
void TDocumento::on_read(int err, word lockop)
|
||||||
{
|
{
|
||||||
int err = TMultiple_rectype::read(f, op, lockop);
|
|
||||||
|
|
||||||
_cli_for.zero();
|
_cli_for.zero();
|
||||||
_occas.zero();
|
_occas.zero();
|
||||||
|
|
||||||
@ -813,7 +811,19 @@ int TDocumento::read(TBaseisamfile& f, word op, word lockop)
|
|||||||
_old_agente = get(DOC_CODAG);
|
_old_agente = get(DOC_CODAG);
|
||||||
_old_agente1 = get(DOC_CODAGVIS);
|
_old_agente1 = get(DOC_CODAGVIS);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int TDocumento::read(TBaseisamfile& f, word op, word lockop)
|
||||||
|
{
|
||||||
|
const int err = TMultiple_rectype::read(f, op, lockop);
|
||||||
|
on_read(err, lockop);
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
|
int TDocumento::readat(TBaseisamfile& f, TRecnotype nrec, word lockop)
|
||||||
|
{
|
||||||
|
const int err = TMultiple_rectype::readat(f, nrec, lockop);
|
||||||
|
on_read(err, lockop);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2517,7 +2527,8 @@ real TDocumento::valore(bool totale, bool lordo, int ndec) const
|
|||||||
|
|
||||||
void TDocumento::put_str(const char* fieldname, const char* val)
|
void TDocumento::put_str(const char* fieldname, const char* val)
|
||||||
{
|
{
|
||||||
if (strcmp(fieldname, DOC_TIPODOC) == 0)
|
const TFixed_string fn(fieldname);
|
||||||
|
if (fn == DOC_TIPODOC)
|
||||||
{
|
{
|
||||||
const TString4 v(val);
|
const TString4 v(val);
|
||||||
if (TRectype::get(DOC_TIPODOC) != v)
|
if (TRectype::get(DOC_TIPODOC) != v)
|
||||||
@ -2528,9 +2539,8 @@ void TDocumento::put_str(const char* fieldname, const char* val)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
dirty_fields();
|
dirty_fields();
|
||||||
}
|
} else
|
||||||
else
|
if (fn == DOC_CODCF)
|
||||||
if (strcmp(fieldname, DOC_CODCF) == 0)
|
|
||||||
{
|
{
|
||||||
const TString8 v(val);
|
const TString8 v(val);
|
||||||
put(DOC_SPESEUPD, TRectype::get(DOC_CODCF) == v);
|
put(DOC_SPESEUPD, TRectype::get(DOC_CODCF) == v);
|
||||||
@ -2541,7 +2551,7 @@ void TDocumento::put_str(const char* fieldname, const char* val)
|
|||||||
{
|
{
|
||||||
TAuto_variable_rectype::put_str(fieldname, val);
|
TAuto_variable_rectype::put_str(fieldname, val);
|
||||||
dirty_fields();
|
dirty_fields();
|
||||||
if (strcmp(fieldname, DOC_SCONTOPERC) == 0)
|
if (fn == DOC_SCONTOPERC)
|
||||||
set_riga_sconto();
|
set_riga_sconto();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2597,7 +2607,7 @@ const TAgente & TDocumento::agente(bool first) const
|
|||||||
return _agenti->agente(first ? get(DOC_CODAG) : get(DOC_CODAGVIS));
|
return _agenti->agente(first ? get(DOC_CODAG) : get(DOC_CODAGVIS));
|
||||||
}
|
}
|
||||||
|
|
||||||
TDocumento & TDocumento::copy(const TDocumento & d)
|
TDocumento& TDocumento::copy(const TDocumento & d)
|
||||||
{
|
{
|
||||||
TMultiple_rectype::operator=((TMultiple_rectype &)d);
|
TMultiple_rectype::operator=((TMultiple_rectype &)d);
|
||||||
reset_fields(*this);
|
reset_fields(*this);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user