Patch level : aga 2.0 patch 335
Files correlati : Ricompilazione Demo : [ ] Commento : Riportata la versione AGA 1.7 patch 335 git-svn-id: svn://10.65.10.50/trunk@10495 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
46c525e0d9
commit
e4c4b79fbe
@ -9,6 +9,8 @@ int main(int argc, char** argv)
|
||||
{
|
||||
case 1:
|
||||
ba7200(argc, argv) ; break;
|
||||
case 2:
|
||||
ba7300(argc, argv) ; break;
|
||||
case 0:
|
||||
default:
|
||||
ba7100(argc, argv) ; break;
|
||||
|
||||
1
ba/ba7.h
1
ba/ba7.h
@ -3,5 +3,6 @@
|
||||
|
||||
int ba7100(int argc, char* argv[]);
|
||||
int ba7200(int argc, char* argv[]);
|
||||
int ba7300(int argc, char* argv[]);
|
||||
|
||||
#endif
|
||||
|
||||
@ -460,6 +460,7 @@ class TMailer_mask : public TAutomask
|
||||
long _secs;
|
||||
int _mail_semaphore;
|
||||
TMail_messages _box;
|
||||
bool _sequential;
|
||||
|
||||
TString _last_file, _last_app; // Used by file2app
|
||||
|
||||
@ -893,7 +894,11 @@ void TMailer_mask::save_all_lines()
|
||||
msg << " definire il programma gestore del file " << m.get(F_SUBJECT);
|
||||
}
|
||||
else
|
||||
{
|
||||
msg << "non elaborato a causa di un errore (n.ro " << err << ')';
|
||||
if (_sequential)
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
msg << "ignorato in quanto transazione non riconosciuta";
|
||||
@ -1141,14 +1146,16 @@ void TMailer_mask::load()
|
||||
}
|
||||
|
||||
TMailer_mask::TMailer_mask()
|
||||
: TAutomask("ba7100a"),
|
||||
: TAutomask("ba7100a"),
|
||||
_timer_id(XVT_TIMER_ERROR), _mail_semaphore(0)
|
||||
{
|
||||
load();
|
||||
if (user() != ::dongle().administrator())
|
||||
{
|
||||
disable(- G_SUPERUSER);
|
||||
}
|
||||
}
|
||||
TConfig c(CONFIG_DITTA, "ba7");
|
||||
_sequential = c.get_bool("StopOnError");
|
||||
}
|
||||
|
||||
TMailer_mask::~TMailer_mask()
|
||||
|
||||
722
ba/ba7300.cpp
Executable file
722
ba/ba7300.cpp
Executable file
@ -0,0 +1,722 @@
|
||||
#include <applicat.h>
|
||||
#include <automask.h>
|
||||
#include <execp.h>
|
||||
#include <prefix.h>
|
||||
#include <postman.h>
|
||||
#include <progind.h>
|
||||
#include <recarray.h>
|
||||
#include <relation.h>
|
||||
#include <sheet.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include <direct.h>
|
||||
#include "ba7300.h"
|
||||
|
||||
class TFile_selector : public TAutomask
|
||||
{
|
||||
TArray_sheet* _sht;
|
||||
|
||||
protected:
|
||||
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
||||
|
||||
public:
|
||||
TFile_selector();
|
||||
virtual ~TFile_selector();
|
||||
};
|
||||
|
||||
bool TFile_selector::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||
{
|
||||
switch (o.dlg())
|
||||
{
|
||||
case F_FILE:
|
||||
if (e == fe_button)
|
||||
{
|
||||
const int nfile = atoi(o.get());
|
||||
FOR_EACH_SHEET_ROW_BACK((*_sht), i, row)
|
||||
{
|
||||
if (row->get_int(0) == nfile)
|
||||
{
|
||||
_sht->select(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
switch (_sht->run())
|
||||
{
|
||||
case K_ENTER:
|
||||
{
|
||||
TToken_string& row = _sht->row(-1);
|
||||
set(o.dlg(), row.get(0));
|
||||
e = fe_modify;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (e == fe_modify)
|
||||
{
|
||||
const TPrefix& pref = prefix();
|
||||
const int total = pref.items();
|
||||
const int nfile = atoi(o.get());
|
||||
FOR_EACH_SHEET_ROW_BACK((*_sht), i, row)
|
||||
{
|
||||
if (row->get_int(0) == nfile)
|
||||
{
|
||||
set(o.dlg()+1, row->get(1));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
TList_field& lb = (TList_field&)field(F_KEY);
|
||||
if (i < 0)
|
||||
{
|
||||
lb.replace_items("", "");
|
||||
return error_box("Inserire un numero di file valido");
|
||||
}
|
||||
|
||||
TLocalisamfile f(nfile);
|
||||
const RecDes& rd = *f.curr().rec_des();
|
||||
TToken_string codes, items;
|
||||
for (i = 1; i <= rd.NKeys; i++)
|
||||
{
|
||||
codes.add(i);
|
||||
items.add("Chiave "); items << i;
|
||||
}
|
||||
lb.replace_items(codes, items);
|
||||
lb.set("1");
|
||||
}
|
||||
break;
|
||||
case F_KEY:
|
||||
if (e == fe_modify)
|
||||
{
|
||||
const int nkey = atoi(o.get());
|
||||
const int nfile = get_int(F_FILE);
|
||||
if (nfile >= LF_USER && nkey > 0)
|
||||
{
|
||||
TLocalisamfile f(nfile);
|
||||
const RecDes& rd = *f.curr().rec_des();
|
||||
const KeyDes& kd = rd.Ky[nkey-1];
|
||||
TToken_string str("", '+');
|
||||
for (int i = 0; i < kd.NkFields; i++)
|
||||
{
|
||||
const int nf = kd.FieldSeq[i] % MaxFields;
|
||||
const RecFieldDes& rf = rd.Fd[nf];
|
||||
str.add(rf.Name);
|
||||
}
|
||||
set(o.dlg()+1, str);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
static int find_edit_apps(TConfig& cfg, void* jolly)
|
||||
{
|
||||
TBit_array& ba = *(TBit_array*)jolly;
|
||||
TAssoc_array& ass = cfg.list_variables();
|
||||
FOR_EACH_ASSOC_STRING(ass, obj, key, val)
|
||||
{
|
||||
if (strncmp(key, "Edit_", 5) == 0)
|
||||
{
|
||||
const int nfile = atoi(key+5);
|
||||
ba.set(nfile);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
TFile_selector::TFile_selector() : TAutomask("ba7300a")
|
||||
{
|
||||
TIndwin iw(0, "Inizializzazione Editors...", FALSE, FALSE);
|
||||
|
||||
_sht = new TArray_sheet(-1,-1,-6,-6,"Selezione archivio", "Numero@6R|Descrizione@50|Editor|E-Mail");
|
||||
const TPrefix& pref = prefix();
|
||||
const int total = pref.items();
|
||||
TString app, mail;
|
||||
|
||||
TBit_array edit_apps, mail_apps;
|
||||
|
||||
TConfig ini("install.ini", "Main");
|
||||
ini.for_each_paragraph(find_edit_apps, &edit_apps);
|
||||
|
||||
TConfig inidit(CONFIG_DITTA, "MailTransactions");
|
||||
TAuto_token_string filter;
|
||||
for (int f = 0; inidit.exist("Filter", f); f++)
|
||||
{
|
||||
filter = inidit.get("Filter", NULL, f);
|
||||
const int num = filter.get_int(1);
|
||||
mail_apps.set(num);
|
||||
}
|
||||
|
||||
for (int i = LF_USER; i < total; i++)
|
||||
{
|
||||
const bool can_edit = edit_apps[i];
|
||||
const bool can_mail = mail_apps[i];
|
||||
|
||||
if (can_edit || can_mail)
|
||||
{
|
||||
app.cut(0);
|
||||
if (can_edit && i > LF_TAB)
|
||||
{
|
||||
TLocalisamfile f(i);
|
||||
f.get_relapp(app);
|
||||
}
|
||||
mail = can_mail ? "X" : "";
|
||||
|
||||
TToken_string* row = new TToken_string;
|
||||
*row << i;
|
||||
row->add(pref.description(*row));
|
||||
row->add(app);
|
||||
row->add(mail);
|
||||
_sht->rows_array().add(row);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
TFile_selector::~TFile_selector()
|
||||
{
|
||||
delete _sht;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// TBrowser_sheet
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
class TBrowser_sheet : public TCursor_sheet
|
||||
{
|
||||
public:
|
||||
TBrowser_sheet(TCursor* c, const char* f, const char* t, const char* h);
|
||||
};
|
||||
|
||||
TBrowser_sheet::TBrowser_sheet(TCursor* c, const char* f, const char* t, const char* h)
|
||||
: TCursor_sheet(c, f, t, h, 0x3, 1)
|
||||
{
|
||||
TToken_string tag = "Selezione";
|
||||
add_tag_buttons(tag);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// TRecord_selector
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
class TRecord_selector : public TAutomask
|
||||
{
|
||||
TRelation* _relation;
|
||||
TCursor* _cursor;
|
||||
TToken_string _fields, _head;
|
||||
|
||||
protected:
|
||||
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
||||
bool add_special_field(short id, const RecFieldDes& rf, int x, int y);
|
||||
|
||||
void add_browse_field(const RecFieldDes& rf);
|
||||
int create_fields(const char* title, const RecDes& rd, int nkey, short id, int starty);
|
||||
|
||||
public:
|
||||
TCursor& cursor() { return *_cursor; }
|
||||
TToken_string& fields() { return _fields; }
|
||||
|
||||
TRecord_selector(const TFile_selector& fm);
|
||||
virtual ~TRecord_selector();
|
||||
};
|
||||
|
||||
bool TRecord_selector::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||
{
|
||||
if (o.dlg() >= 201 && e == fe_button)
|
||||
{
|
||||
const char* title = _cursor->file().description();
|
||||
TBrowser_sheet cs(_cursor, _fields, title, _head);
|
||||
|
||||
const short first_id = o.dlg() >= 301 ? 301 : 201;
|
||||
TRectype& rec = _cursor->curr();
|
||||
rec.zero();
|
||||
if (_fields.not_empty())
|
||||
{
|
||||
short id = first_id;
|
||||
FOR_EACH_TOKEN(_fields, tok)
|
||||
{
|
||||
if (id2pos(id) > 0)
|
||||
rec.put(tok, get(id++));
|
||||
else
|
||||
break;
|
||||
}
|
||||
const TRecnotype pos = _cursor->read();
|
||||
cs.select(pos);
|
||||
}
|
||||
|
||||
const KEY k = cs.run();
|
||||
switch (k)
|
||||
{
|
||||
case K_ENTER:
|
||||
{
|
||||
short id = first_id;
|
||||
FOR_EACH_TOKEN(_fields, tok)
|
||||
{
|
||||
if (id2pos(id) > 0)
|
||||
set(id++, rec.get(tok));
|
||||
else
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case K_INS:
|
||||
{
|
||||
TString str;
|
||||
if (_cursor->file().get_relapp(str))
|
||||
{
|
||||
TExternal_app app(str);
|
||||
app.run();
|
||||
}
|
||||
else
|
||||
error_box("Il file non è associato ad un editor");
|
||||
}
|
||||
break;
|
||||
case K_CTRL+'G':
|
||||
{
|
||||
const char* const inifile = "trans.ini";
|
||||
TConfig ini(inifile, "Transaction");
|
||||
ini.remove_all();
|
||||
ini.set("Action", "Modify");
|
||||
TString str; str << _cursor->file().num();
|
||||
ini.set_paragraph(str);
|
||||
ini.remove_all();
|
||||
TToken_string row = cs.row(-1);
|
||||
TString16 field;
|
||||
for (int i = 0; ; i++)
|
||||
{
|
||||
_fields.get(i, field);
|
||||
if (field.not_empty())
|
||||
ini.set(field, row.get(i));
|
||||
else
|
||||
break;
|
||||
}
|
||||
ini.set_paragraph("Transaction"); // Forza il flush
|
||||
if (_cursor->file().get_relapp(str))
|
||||
{
|
||||
str << " /i" << inifile;
|
||||
TExternal_app app(str);
|
||||
app.run();
|
||||
}
|
||||
else
|
||||
error_box("Il file non è associato ad un editor");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool TRecord_selector::add_special_field(short id, const RecFieldDes& rf, int x, int y)
|
||||
{
|
||||
TString16 prompt = rf.Name;
|
||||
prompt.lower();
|
||||
prompt[0] = toupper(prompt[0]);
|
||||
prompt.left_just(14);
|
||||
|
||||
const logicnum = get_int(F_FILE);
|
||||
|
||||
if (logicnum == LF_DOC && strcmp(rf.Name, "PROVV") == 0)
|
||||
{
|
||||
add_list(id, 0, prompt, x, y, 12, "", "D|P", "Definitivo|Provvisiorio");
|
||||
return TRUE;
|
||||
}
|
||||
if (strcmp(rf.Name, "TIPOCF") == 0)
|
||||
{
|
||||
add_list(id, 0, prompt, x, y, 9, "", "C|F", "Cliente|Fornitore");
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
int TRecord_selector::create_fields(const char* title, const RecDes& rd, int nkey, short id, int starty)
|
||||
{
|
||||
TString prompt;
|
||||
int i;
|
||||
|
||||
int x = 2;
|
||||
|
||||
const KeyDes& kd = rd.Ky[nkey];
|
||||
const int nf = kd.NkFields;
|
||||
|
||||
int rows = 1;
|
||||
for (i = 0; i < nf; i++)
|
||||
{
|
||||
const int nf = kd.FieldSeq[i] % MaxFields;
|
||||
const RecFieldDes& rf = rd.Fd[nf];
|
||||
if (x + rf.Len + 16 > 76)
|
||||
{
|
||||
x = 2;
|
||||
rows++;
|
||||
}
|
||||
x += (rf.Len+16) > 38 ? 76 : 38;
|
||||
}
|
||||
|
||||
add_groupbox(-1, 0, title, 1, starty, 80, rows+2);
|
||||
|
||||
int y = starty+1;
|
||||
x = 2;
|
||||
for (i = 0; i < nf; i++)
|
||||
{
|
||||
const int nf = kd.FieldSeq[i] % MaxFields;
|
||||
const RecFieldDes& rf = rd.Fd[nf];
|
||||
prompt = rf.Name;
|
||||
prompt.lower();
|
||||
prompt[0] = toupper(prompt[0]);
|
||||
prompt.left_just(14);
|
||||
|
||||
if (x + rf.Len + 16 > 76)
|
||||
{
|
||||
x = 2;
|
||||
y++;
|
||||
}
|
||||
|
||||
switch (rf.TypeF)
|
||||
{
|
||||
case _intfld:
|
||||
case _longfld:
|
||||
case _realfld:
|
||||
case _wordfld:
|
||||
add_number(id+i, 0, prompt, x, y, rf.Len, "BU");
|
||||
break;
|
||||
case _intzerofld:
|
||||
case _longzerofld:
|
||||
add_number(id+i, 0, prompt, x, y, rf.Len, "BUZ");
|
||||
break;
|
||||
case _datefld:
|
||||
add_date(id+i, 0, prompt, x, y, "B");
|
||||
break;
|
||||
case _boolfld:
|
||||
add_boolean(id+i, 0, prompt, x, y);
|
||||
break;
|
||||
case _alfafld:
|
||||
case _charfld:
|
||||
default:
|
||||
if (!add_special_field(id+i, rf, x, y))
|
||||
add_string(id+i, 0, prompt, x, y, rf.Len, "BU");
|
||||
break;
|
||||
}
|
||||
|
||||
x += (rf.Len+16) > 38 ? 76 : 38;
|
||||
}
|
||||
return y+1;
|
||||
}
|
||||
|
||||
void TRecord_selector::add_browse_field(const RecFieldDes& rf)
|
||||
{
|
||||
if (_fields.get_pos(rf.Name) < 0)
|
||||
{
|
||||
TString16 prompt = rf.Name;
|
||||
_fields.add(prompt);
|
||||
prompt.lower();
|
||||
prompt[0] = toupper(prompt[0]);
|
||||
|
||||
const int len = min(rf.Len, 50);
|
||||
if (len > prompt.len())
|
||||
prompt << '@' << len;
|
||||
_head.add(prompt);
|
||||
}
|
||||
}
|
||||
|
||||
TRecord_selector::TRecord_selector(const TFile_selector& fm) : TAutomask("ba7300a")
|
||||
{
|
||||
for (short id = F_FILE; id <= F_SENDMAIL; id++)
|
||||
{
|
||||
set(id, fm.get(id));
|
||||
if (id < F_SENDMAIL)
|
||||
field(id).disable();
|
||||
}
|
||||
|
||||
const int logicnum = get_int(F_FILE);
|
||||
const int nkey = get_int(F_KEY)-1;
|
||||
_relation = new TRelation(logicnum);
|
||||
_cursor = new TCursor(_relation, "", nkey+1);
|
||||
|
||||
const RecDes& rd = *_relation->curr().rec_des();
|
||||
|
||||
const KeyDes& kd = rd.Ky[nkey];
|
||||
|
||||
int i;
|
||||
for (i = 0; i < kd.NkFields; i++)
|
||||
{
|
||||
const int nf = kd.FieldSeq[i] % MaxFields;
|
||||
const RecFieldDes& rf = rd.Fd[nf];
|
||||
add_browse_field(rf);
|
||||
}
|
||||
|
||||
for (int k = 0; k < rd.NKeys; k++) if (k != nkey)
|
||||
{
|
||||
const KeyDes& kd = rd.Ky[k];
|
||||
for (i = 0; i < kd.NkFields; i++)
|
||||
{
|
||||
const int nf = kd.FieldSeq[i] % MaxFields;
|
||||
const RecFieldDes& rf = rd.Fd[nf];
|
||||
add_browse_field(rf);
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < rd.NFields && _head.items() < 6; i++)
|
||||
{
|
||||
const RecFieldDes& rf = rd.Fd[i];
|
||||
add_browse_field(rf);
|
||||
}
|
||||
|
||||
int y = 5;
|
||||
y = create_fields("@bDal record", rd, nkey, 201, y);
|
||||
create_fields("@bAl record", rd, nkey, 301, y+1);
|
||||
set_handlers();
|
||||
}
|
||||
|
||||
TRecord_selector::~TRecord_selector()
|
||||
{
|
||||
delete _cursor;
|
||||
delete _relation;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// MailFlood app
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
class TMail_flood_app : public TSkeleton_application
|
||||
{
|
||||
virtual void main_loop();
|
||||
|
||||
protected:
|
||||
void send_records(TCursor& cur);
|
||||
void send_mails(TCursor& cur);
|
||||
void fill_rows(const TRectype& parent, int logicnum, TConfig& ini) const;
|
||||
|
||||
public:
|
||||
void fill_key(const TRectype& curr, TConfig& ini) const;
|
||||
void fill_transaction(const TRectype& curr, TConfig& ini) const;
|
||||
void send_selected(TRecord_selector& m);
|
||||
};
|
||||
|
||||
inline TMail_flood_app& app() { return (TMail_flood_app&)main_app(); }
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// Main
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
void TMail_flood_app::fill_key(const TRectype& curr, TConfig& ini) const
|
||||
{
|
||||
TString16 para; para << curr.num();
|
||||
ini.set_paragraph(para);
|
||||
ini.remove_all();
|
||||
|
||||
const RecDes& rd = *curr.rec_des();
|
||||
const KeyDes& kd = rd.Ky[0];
|
||||
for (int i = 0; i < kd.NkFields; i++)
|
||||
{
|
||||
const int nf = kd.FieldSeq[i] % MaxFields;
|
||||
const RecFieldDes& rf = rd.Fd[nf];
|
||||
const char* field = rf.Name;
|
||||
ini.set(field, curr.get(field));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void TMail_flood_app::send_records(TCursor& cur)
|
||||
{
|
||||
TFilename dir; dir.tempdir();
|
||||
dir.add("transpos");
|
||||
::mkdir(dir);
|
||||
|
||||
const TRectype& curr = cur.curr();
|
||||
|
||||
cur.freeze();
|
||||
const long items = cur.items();
|
||||
TProgind pi(items, "Generazione transazioni...", FALSE, TRUE);
|
||||
|
||||
TString16 para; para << curr.num(); // Paragrafo con i campi
|
||||
TFilename ininame;
|
||||
|
||||
for (cur = 0; cur.pos() < items; ++cur)
|
||||
{
|
||||
pi.addstatus(1);
|
||||
ininame = dir;
|
||||
ininame << SLASH << "tr" << cur.pos() << ".ini";
|
||||
TConfig ini(ininame, "Transaction");
|
||||
ini.set("Action", "SaveAndExit"); // Funziona qualsiasi nome diverso da Modify, Insert e Run
|
||||
ini.set("Mode", "A");
|
||||
fill_key(curr, ini);
|
||||
}
|
||||
|
||||
TString appname;
|
||||
if (cur.file().get_relapp(appname))
|
||||
{
|
||||
appname << " /i" << dir << SLASH << "tr*.ini";
|
||||
TExternal_app app(appname);
|
||||
app.run();
|
||||
}
|
||||
|
||||
for (long i = 0; i < items; i++)
|
||||
{
|
||||
ininame = dir;
|
||||
ininame << SLASH << "tr" << i << ".ini";
|
||||
::remove(ininame);
|
||||
}
|
||||
::rmdir(dir);
|
||||
}
|
||||
|
||||
void TMail_flood_app::fill_rows(const TRectype& parent, int logicnum, TConfig& ini) const
|
||||
{
|
||||
TLocalisamfile rowsfile(logicnum); // Carico tracciato record!
|
||||
TRectype& rec = rowsfile.curr();
|
||||
|
||||
TString16 numfield;
|
||||
|
||||
const RecDes& rd = *rec.rec_des();
|
||||
const KeyDes& kd = rd.Ky[0];
|
||||
for (int i = 0; i < kd.NkFields; i++)
|
||||
{
|
||||
const int nf = kd.FieldSeq[i] % MaxFields;
|
||||
const RecFieldDes& rf = rd.Fd[nf];
|
||||
const char* field = rf.Name;
|
||||
if (i < kd.NkFields-1)
|
||||
rec.put(field, parent.get(field)); // Copia nella riga la chiave 1 della testata
|
||||
else
|
||||
numfield = field; // Memorizza campo numeratore
|
||||
}
|
||||
|
||||
TRecord_array arr(rec, numfield);
|
||||
for (int r = arr.first_row(); r > 0 && r <= arr.rows(); r = arr.succ_row(r))
|
||||
{
|
||||
const TRectype& row = arr[r];
|
||||
TString16 para; para << row.num() << ',' << r;
|
||||
ini.set_paragraph(para);
|
||||
|
||||
for (int i = row.items()-1; i >= 0; i--)
|
||||
{
|
||||
const char* name = row.fieldname(i);
|
||||
if (strcmp(name, "G1") != 0)
|
||||
{
|
||||
TFieldref fr(name, 0);
|
||||
fr.write(ini, para, row.get(name));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void TMail_flood_app::fill_transaction(const TRectype& rec, TConfig& ini) const
|
||||
{
|
||||
TString16 para; para << rec.num();
|
||||
ini.set_paragraph(para);
|
||||
|
||||
for (int i = rec.items()-1; i >= 0; i--)
|
||||
{
|
||||
const char* name = rec.fieldname(i);
|
||||
TFieldref fr(name, 0);
|
||||
fr.write(ini, para, rec.get(name));
|
||||
}
|
||||
|
||||
switch (rec.num())
|
||||
{
|
||||
case LF_ANAMAG:
|
||||
fill_rows(rec, LF_UMART, ini);
|
||||
break;
|
||||
case LF_DIST:
|
||||
fill_rows(rec, LF_RDIST, ini);
|
||||
break;
|
||||
case LF_DOC:
|
||||
fill_rows(rec, LF_RIGHEDOC, ini);
|
||||
break;
|
||||
case LF_MOV:
|
||||
fill_rows(rec, LF_RMOV, ini);
|
||||
fill_rows(rec, LF_RMOVIVA, ini);
|
||||
break;
|
||||
default: break;
|
||||
};
|
||||
}
|
||||
|
||||
void TMail_flood_app::send_mails(TCursor& cur)
|
||||
{
|
||||
const TRectype& rec = cur.curr();
|
||||
|
||||
TFilename ininame; ininame.tempdir();
|
||||
ininame.add("trans.ini");
|
||||
|
||||
cur.freeze();
|
||||
const long items = cur.items();
|
||||
TProgind pi(items, "Spedizione transazioni...", TRUE, TRUE);
|
||||
|
||||
const long ditta = main_app().get_firm();
|
||||
|
||||
for (cur = 0; cur.pos() < items; ++cur)
|
||||
{
|
||||
pi.addstatus(1);
|
||||
if (pi.iscancelled())
|
||||
break;
|
||||
const bool ok = ::can_dispatch_transaction(rec);
|
||||
if (ok)
|
||||
{
|
||||
TConfig ini(ininame, "Transaction");
|
||||
ini.set("Action", "Modify");
|
||||
ini.set("Firm", ditta);
|
||||
ini.set("Mode", "A");
|
||||
fill_transaction(rec, ini);
|
||||
}
|
||||
if (ok)
|
||||
{
|
||||
::dispatch_transaction(rec, ininame);
|
||||
::remove(ininame);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void TMail_flood_app::send_selected(TRecord_selector& m)
|
||||
{
|
||||
TCursor cur = m.cursor();
|
||||
TRectype recfrom = cur.curr();
|
||||
TRectype recto = cur.curr();
|
||||
|
||||
recfrom.zero();
|
||||
recto.zero();
|
||||
for (int i = 0; ; i++)
|
||||
{
|
||||
if (m.id2pos(201+i) < 0)
|
||||
break;
|
||||
const char* field = m.fields().get(i);
|
||||
recfrom.put(field, m.get(201+i));
|
||||
recto.put(field, m.get(301+i));
|
||||
}
|
||||
|
||||
cur.setregion(recfrom, recto);
|
||||
const long items = cur.items();
|
||||
if (items > 0)
|
||||
{
|
||||
if (yesno_box("Confermare l'invio di %ld transazioni", items))
|
||||
{
|
||||
if (m.get_bool(F_SENDMAIL))
|
||||
send_mails(cur);
|
||||
else
|
||||
send_records(cur);
|
||||
}
|
||||
}
|
||||
else
|
||||
warning_box("Nessun record da inviare");
|
||||
}
|
||||
|
||||
void TMail_flood_app::main_loop()
|
||||
{
|
||||
TFile_selector fm;
|
||||
while (fm.run() == K_ENTER)
|
||||
{
|
||||
TRecord_selector rm(fm);
|
||||
while (rm.run() == K_ENTER)
|
||||
send_selected(rm);
|
||||
}
|
||||
}
|
||||
|
||||
int ba7300(int argc, char* argv[])
|
||||
{
|
||||
TMail_flood_app ma;
|
||||
ma.run(argc, argv, "Sincronicity");
|
||||
|
||||
return 0;
|
||||
}
|
||||
6
ba/ba7300.h
Executable file
6
ba/ba7300.h
Executable file
@ -0,0 +1,6 @@
|
||||
#define F_FILE 101
|
||||
#define F_DESCR 102
|
||||
#define F_KEY 103
|
||||
#define F_KEYDES 104
|
||||
#define F_SENDMAIL 105
|
||||
|
||||
64
ba/ba7300a.uml
Executable file
64
ba/ba7300a.uml
Executable file
@ -0,0 +1,64 @@
|
||||
#include "ba7300.h"
|
||||
|
||||
TOOLBAR "" 0 -3 0 3
|
||||
|
||||
BUTTON DLG_OK 10 2
|
||||
BEGIN
|
||||
PROMPT -12 -11 ""
|
||||
END
|
||||
|
||||
BUTTON DLG_CANCEL 10 2
|
||||
BEGIN
|
||||
PROMPT -22 -11 ""
|
||||
END
|
||||
|
||||
END
|
||||
|
||||
PAGE "Invio" -1 -1 0 0
|
||||
|
||||
GROUPBOX DLG_NULL 80 5
|
||||
BEGIN
|
||||
PROMPT 1 0 "@bSelezione file"
|
||||
END
|
||||
|
||||
NUMBER F_FILE 3
|
||||
BEGIN
|
||||
PROMPT 2 1 "File "
|
||||
FLAGS "B"
|
||||
WARNING "Selezionare un file"
|
||||
END
|
||||
|
||||
STRING F_DESCR 50
|
||||
BEGIN
|
||||
PROMPT 26 1 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
LIST F_KEY 1 8
|
||||
BEGIN
|
||||
PROMPT 2 2 "Ordinamento "
|
||||
ITEM "1|Chiave 1"
|
||||
ITEM "2|Chiave 2"
|
||||
ITEM "3|Chiave 3"
|
||||
ITEM "4|Chiave 4"
|
||||
ITEM "5|Chiave 5"
|
||||
ITEM "6|Chiave 6"
|
||||
ITEM "7|Chiave 7"
|
||||
ITEM "8|Chiave 8"
|
||||
ITEM "9|Chiave 9"
|
||||
END
|
||||
|
||||
STRING F_KEYDES 128 50
|
||||
BEGIN
|
||||
PROMPT 26 2 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
BOOLEAN F_SENDMAIL
|
||||
BEGIN
|
||||
PROMPT 2 3 "Inviare direttamente le transazioni tramite e-mail"
|
||||
END
|
||||
|
||||
END
|
||||
|
||||
ENDMASK
|
||||
15
ba/ba8.cpp
Executable file
15
ba/ba8.cpp
Executable file
@ -0,0 +1,15 @@
|
||||
#include <xvt.h>
|
||||
|
||||
#include "ba8.h"
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
const int n = argc > 1 ? atoi(argv[1]+1) : 0;
|
||||
switch (n)
|
||||
{
|
||||
default:
|
||||
ba8100(argc, argv);
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
3
ba/ba8.url
Executable file
3
ba/ba8.url
Executable file
@ -0,0 +1,3 @@
|
||||
#include <default.url>
|
||||
|
||||
#include <mainmenu.url>
|
||||
425
ba/ba8100.cpp
Executable file
425
ba/ba8100.cpp
Executable file
@ -0,0 +1,425 @@
|
||||
#include <applicat.h>
|
||||
#include <execp.h>
|
||||
#include <relation.h>
|
||||
#include <sheet.h>
|
||||
#include <tabutil.h>
|
||||
#include <urldefid.h>
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// TSelector_sheet
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
class TSelector_sheet : public TCursor_sheet
|
||||
{
|
||||
TString _field;
|
||||
|
||||
private:
|
||||
static TSelector_sheet* _sheet;
|
||||
static bool selector_handler(TMask_field& fld, KEY k);
|
||||
|
||||
public:
|
||||
TSelector_sheet(TCursor& cur, const char* fields, const char* caption,
|
||||
const char* head, const TEdit_field& fld);
|
||||
};
|
||||
|
||||
TSelector_sheet* TSelector_sheet::_sheet = NULL;
|
||||
|
||||
bool TSelector_sheet::selector_handler(TMask_field& fld, KEY k)
|
||||
{
|
||||
long sel = -1;
|
||||
|
||||
if (k == K_F2)
|
||||
sel = 0;
|
||||
|
||||
if (k == K_TAB)
|
||||
{
|
||||
TCursor& cur = *_sheet->cursor();
|
||||
((TEdit_field&)fld).autosave(*cur.relation());
|
||||
sel = cur.read();
|
||||
}
|
||||
|
||||
if (sel >= 0 && sel != _sheet->selected())
|
||||
_sheet->post_select(sel);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
TSelector_sheet::TSelector_sheet(TCursor& cur, const char* fields, const char* caption,
|
||||
const char* head, const TEdit_field& c)
|
||||
: TCursor_sheet(&cur, fields, caption, head, 0x3, 1, SCREEN_WIN)
|
||||
{
|
||||
TToken_string cap = c.prompt();
|
||||
if (cap.empty())
|
||||
cap = caption;
|
||||
add_tag_buttons(cap);
|
||||
|
||||
TString16 flags;
|
||||
if (c.roman()) flags << 'M';
|
||||
if (c.right_justified()) flags << 'R';
|
||||
if (c.uppercase()) flags << 'U';
|
||||
if (c.zerofilled()) flags << 'Z';
|
||||
const int csize = c.size();
|
||||
|
||||
TEdit_field* e = NULL;
|
||||
switch (c.class_id())
|
||||
{
|
||||
case CLASS_EDIT_FIELD:
|
||||
e = &add_string(c.dlg(), 0, "", 1, 0, csize, flags, csize > 50 ? 50 : csize);
|
||||
break;
|
||||
case CLASS_REAL_FIELD:
|
||||
e = &add_number(c.dlg(), 0, "", 1, 0, csize, flags);
|
||||
break;
|
||||
case CLASS_DATE_FIELD:
|
||||
e = &add_date (c.dlg(), 0, "", 1, 0, flags);
|
||||
break;
|
||||
default:
|
||||
e = NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
if (e != NULL)
|
||||
{
|
||||
e->set_field(c.field()->name());
|
||||
_sheet = this;
|
||||
e->set_handler(selector_handler);
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// TQuery_string
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
class TQuery_string : public TMask
|
||||
{
|
||||
public:
|
||||
TQuery_string(const char* prm, WINDOW parent);
|
||||
};
|
||||
|
||||
TQuery_string::TQuery_string(const char* prm, WINDOW parent)
|
||||
: TMask("Richiesta", 1, 52, 6, -1, -1, parent)
|
||||
{
|
||||
TParagraph_string str(prm, 50);
|
||||
for (int y = 0; ; y++)
|
||||
{
|
||||
const char* s = str.get();
|
||||
if (s == NULL)
|
||||
break;
|
||||
add_static(DLG_NULL, 0, s, 1, y);
|
||||
}
|
||||
add_string(DLG_USER, 0, "", 1, 4, 50);
|
||||
add_button(DLG_CANCEL, 0, "", -12, -1, 10, 2);
|
||||
add_button(DLG_OK, 0, "", -22, -1, 10, 2);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// TSelector_app
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
class TSelector_app : public TSkeleton_application
|
||||
{
|
||||
TFilename _fileini;
|
||||
TString _filetable;
|
||||
int _filekey;
|
||||
TAuto_token_string _fileinput;
|
||||
|
||||
protected:
|
||||
virtual void main_loop();
|
||||
|
||||
bool find_relapp(TString& app) const;
|
||||
bool find_mask_name(TFilename& name) const;
|
||||
|
||||
public:
|
||||
void parse_command_line();
|
||||
bool get_mask_name(TFilename& name) const;
|
||||
void save_cursor(TCursor& cur, TConfig& ini);
|
||||
void save_cursor_key(TCursor& cur, TConfig& ini);
|
||||
void run_transaction(const char* trans);
|
||||
};
|
||||
|
||||
bool TSelector_app::find_relapp(TString& app) const
|
||||
{
|
||||
bool ok = FALSE;
|
||||
const int logicnum = atoi(_filetable);
|
||||
if (logicnum >= LF_USER)
|
||||
{
|
||||
TLocalisamfile file(logicnum);
|
||||
ok = file.get_relapp(app);
|
||||
}
|
||||
else
|
||||
{
|
||||
TTable t(_filetable);
|
||||
ok = t.get_relapp(app);
|
||||
}
|
||||
|
||||
if (!ok)
|
||||
{
|
||||
TString str;
|
||||
str << "Non è possibile determinare l'applicazione associata al file " << _filetable << ". "
|
||||
<< "E' possibile inserire qui il nome del programma (ad esempio 'ba4 -0'). "
|
||||
<< "In caso di dubbio premere Annulla.";
|
||||
TQuery_string m(str, SCREEN_WIN);
|
||||
if (m.run())
|
||||
{
|
||||
TToken_string s(m.get(DLG_USER), ' ');
|
||||
TFilename a = s.get(); a.ext("exe");
|
||||
ok = a.exist();
|
||||
if (ok)
|
||||
{
|
||||
app = s;
|
||||
s = app.left(2); s << '0'; // default module paragraph
|
||||
TConfig ini("install.ini", s);
|
||||
str.format("Edit_%d", logicnum);
|
||||
ini.set(str, app);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool TSelector_app::find_mask_name(TFilename& name) const
|
||||
{
|
||||
TFilename app;
|
||||
bool ok = find_relapp(app);
|
||||
if (ok)
|
||||
{
|
||||
if (isdigit(_filetable[0]))
|
||||
{
|
||||
name = app.left(3);
|
||||
name << char(app[5]+1) << "00a.msk";
|
||||
if (!name.exist())
|
||||
{
|
||||
name.rtrim(5);
|
||||
name << ".msk";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
name = app.left(2);
|
||||
name << "tb";
|
||||
const char* t = _filetable;
|
||||
if (*t == '%') t++;
|
||||
name << t << ".msk";
|
||||
}
|
||||
}
|
||||
ok = name.exist();
|
||||
name.ext("");
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool TSelector_app::get_mask_name(TFilename& name) const
|
||||
{
|
||||
const char* t = _filetable;
|
||||
if (*t == '%') t++;
|
||||
TString16 key; key << "Mask_" << t;
|
||||
TConfig ini(CONFIG_DITTA, "ba8");
|
||||
name = ini.get(key);
|
||||
|
||||
bool ok = name.not_empty();
|
||||
if (!ok)
|
||||
{
|
||||
ok = find_mask_name(name);
|
||||
if (ok)
|
||||
ini.set(key, name);
|
||||
}
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
void TSelector_app::parse_command_line()
|
||||
{
|
||||
_filetable = "20";
|
||||
_filekey = 1;
|
||||
_fileinput = "";
|
||||
_fileini = "select.ini";
|
||||
|
||||
if (argc() > 2)
|
||||
{
|
||||
const TString str = argv(2);
|
||||
if (str[0] == '/' || str[0] == '-')
|
||||
{
|
||||
_fileini = str.mid(2);
|
||||
TConfig trans(_fileini, "Transaction");
|
||||
TToken_string sel(trans.get("Action"), ' ');
|
||||
_filetable = sel.get(1);
|
||||
_filekey = sel.get_int();
|
||||
_fileinput = sel.get();
|
||||
}
|
||||
else
|
||||
{
|
||||
_filetable = str;
|
||||
_filekey = argc() > 3 ? atoi(argv(3)) : 1;
|
||||
_fileinput = argc() > 4 ? argv(4) : "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void TSelector_app::save_cursor(TCursor& cur, TConfig& ini)
|
||||
{
|
||||
const TRectype& curr = cur.curr();
|
||||
|
||||
TString16 para; para << curr.num();
|
||||
ini.set_paragraph(para);
|
||||
TString str;
|
||||
|
||||
const int fields = curr.items();
|
||||
for (int i = 0; i < fields; i++)
|
||||
{
|
||||
const char* fieldname = curr.fieldname(i);
|
||||
const TString& value = curr.get(fieldname);
|
||||
if (!value.blank())
|
||||
{
|
||||
if (value[0] == ' ' || value.right(1) == " ")
|
||||
{
|
||||
str.cut(0) << '"' << value << '"';
|
||||
ini.set(fieldname, str);
|
||||
}
|
||||
else
|
||||
ini.set(fieldname, value);
|
||||
}
|
||||
}
|
||||
ini.set_paragraph("Transaction");
|
||||
}
|
||||
|
||||
void TSelector_app::save_cursor_key(TCursor& cur, TConfig& ini)
|
||||
{
|
||||
const TRectype& curr = cur.curr();
|
||||
TString16 para; para << curr.num();
|
||||
ini.set_paragraph(para);
|
||||
|
||||
const RecDes& rd = *curr.rec_des();
|
||||
const KeyDes& kd = rd.Ky[0];
|
||||
for (int i = 0; i < kd.NkFields; i++)
|
||||
{
|
||||
const int nf = kd.FieldSeq[i] % MaxFields;
|
||||
const RecFieldDes& rf = rd.Fd[nf];
|
||||
ini.set(rf.Name, curr.get(rf.Name));
|
||||
}
|
||||
ini.set_paragraph("Transaction");
|
||||
}
|
||||
|
||||
void TSelector_app::run_transaction(const char* trans)
|
||||
{
|
||||
TString cmd;
|
||||
bool ok = find_relapp(cmd);
|
||||
if (ok)
|
||||
{
|
||||
TConfig ini(_fileini, "Transaction");
|
||||
ini.set("Action", trans);
|
||||
}
|
||||
if (ok)
|
||||
{
|
||||
cmd << " /i" << _fileini;
|
||||
TExternal_app app(cmd);
|
||||
app.run();
|
||||
}
|
||||
}
|
||||
|
||||
void TSelector_app::main_loop()
|
||||
{
|
||||
parse_command_line();
|
||||
|
||||
TFilename mask_name;
|
||||
if (!get_mask_name(mask_name))
|
||||
{
|
||||
error_box("Impossibile determinare la maschera associata al file %s", (const char*)_filetable);
|
||||
return;
|
||||
}
|
||||
|
||||
TMask m(mask_name);
|
||||
|
||||
TTemp_window tw(TASK_WIN);
|
||||
tw.iconize();
|
||||
|
||||
for (int f = m.fields()-1; f >= 0; f--)
|
||||
{
|
||||
TMask_field& field = m.fld(f);
|
||||
if (field.in_key(_filekey) && field.is_edit())
|
||||
{
|
||||
TEdit_field& e = (TEdit_field&)field;
|
||||
if (e.browse() != NULL)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (f < 0)
|
||||
{
|
||||
error_box("Impossibile trovare un campo di browse sulla chiave %d nel file",
|
||||
_filekey, (const char*)mask_name);
|
||||
return;
|
||||
}
|
||||
|
||||
TEdit_field& efield = (TEdit_field&)m.fld(f);
|
||||
TBrowse& b = *efield.browse();
|
||||
TCursor& cur = *b.cursor();
|
||||
const char* caption = cur.file().description();
|
||||
long sel = 0;
|
||||
|
||||
if (!_fileinput.empty_items())
|
||||
{
|
||||
TRectype& curr = cur.curr();
|
||||
TToken_string ifn = b.get_input_field_names();
|
||||
TString val;
|
||||
const int maxin = ifn.items() - 1;
|
||||
for (int i = 0; i < maxin; i++)
|
||||
{
|
||||
val = _fileinput.get(i);
|
||||
if (val.empty())
|
||||
break;
|
||||
TFieldref field(ifn.get(i), 0);
|
||||
field.write(val, curr);
|
||||
}
|
||||
cur.setregion(curr, curr);
|
||||
|
||||
val = _fileinput.get(maxin);
|
||||
if (val.not_empty())
|
||||
{
|
||||
TFieldref field(ifn.get(maxin), 0);
|
||||
field.write(val, curr);
|
||||
}
|
||||
sel = cur.read();
|
||||
}
|
||||
TSelector_sheet s(cur, b.items(), caption, b.head(), efield);
|
||||
s.select(sel);
|
||||
|
||||
const KEY k = s.run();
|
||||
|
||||
TConfig ini(_fileini, "Transaction");
|
||||
|
||||
TString_array list;
|
||||
ini.list_paragraphs(list);
|
||||
FOR_EACH_ARRAY_ROW(list, r, row) if (*row != "Transaction")
|
||||
{
|
||||
ini.set_paragraph(*row);
|
||||
ini.remove_all();
|
||||
}
|
||||
ini.set_paragraph("Transaction");
|
||||
switch (k)
|
||||
{
|
||||
case K_ENTER:
|
||||
ini.set("Record", s.selected());
|
||||
ini.set("Result", "OK");
|
||||
ini.set("Error", "0");
|
||||
save_cursor(cur, ini);
|
||||
break;
|
||||
case K_ESC:
|
||||
case K_QUIT:
|
||||
ini.set("Result", "Cancel");
|
||||
ini.set("Error", -1);
|
||||
break;
|
||||
case K_INS:
|
||||
run_transaction("Run");
|
||||
break;
|
||||
default:
|
||||
save_cursor_key(cur, ini);
|
||||
run_transaction("Modify");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int ba8100(int argc, char* argv[])
|
||||
{
|
||||
TSelector_app app;
|
||||
app.run(argc, argv, "Selector");
|
||||
|
||||
return 0;
|
||||
}
|
||||
99
ba/bacnv.cpp
99
ba/bacnv.cpp
@ -26,7 +26,7 @@
|
||||
#include "..\cg\cglib02.h"
|
||||
|
||||
|
||||
#define usage "Errore - uso : bacnv [1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19] ditta"
|
||||
#define usage "Errore - uso : bacnv [1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20] ditta"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Applicazione di conversione archivi XBase, valida per tutti e 4 i tipi di DLL
|
||||
@ -190,6 +190,9 @@ public:
|
||||
void convert_riba_tcf() const;
|
||||
void convert_cdc2cms() const;
|
||||
void convert_mov2movcms() const;
|
||||
void convert_ca7() const;
|
||||
void change_ca7(TRectype& rec) const;
|
||||
void convert_quadst() const;
|
||||
|
||||
TConversione_archivi() : _oldditta(0), _codditta(0), _error(0) {}
|
||||
};
|
||||
@ -347,6 +350,13 @@ bool TConversione_archivi::menu(MENU_TAG)
|
||||
convert_mov2movcms();
|
||||
}
|
||||
break;
|
||||
case 20:
|
||||
if (_codditta == 0)
|
||||
{
|
||||
convert_ca7();
|
||||
convert_quadst();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -1686,9 +1696,12 @@ void TConversione_archivi::convert_cdc2cms() const
|
||||
for (cursore=0; cursore.pos()<items; ++cursore)
|
||||
{
|
||||
pi.addstatus(1);
|
||||
TString80 codcms = curr.get("CODTAB");
|
||||
codcms.lpad(20,'0');
|
||||
curr.put("COD", "CMS");
|
||||
curr.put("CODTAB",codcms);
|
||||
cursore.file().write();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
@ -1697,7 +1710,7 @@ void TConversione_archivi::convert_cdc2cms() const
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
void TConversione_archivi::convert_mov2movcms() const
|
||||
{
|
||||
TRelation rel(LF_MOV);
|
||||
TRelation rel(LF_RMOV);
|
||||
TRectype& curr = rel.curr();
|
||||
TCursor cursore(&rel);
|
||||
const long items = cursore.items();
|
||||
@ -1722,6 +1735,84 @@ void TConversione_archivi::convert_mov2movcms() const
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
// Effettua conversione campi S1 S2 S3 della tabella comune CA7
|
||||
////////////////////////////////////////////////////////////////
|
||||
void TConversione_archivi::convert_ca7() const
|
||||
{
|
||||
TRelation rel(LF_TABCOM);
|
||||
TRectype& curr = rel.curr();
|
||||
curr.put("COD", "CA7");
|
||||
TCursor cursore(&rel, "", 1, &curr, &curr);
|
||||
const long items = cursore.items();
|
||||
cursore.freeze();
|
||||
|
||||
TProgind pi(items, "Conversione causali mod.770...", FALSE, TRUE);
|
||||
for (cursore=0; cursore.pos()<items; ++cursore)
|
||||
{
|
||||
pi.addstatus(1);
|
||||
const TString& cods1 = curr.get("S1");
|
||||
if (cods1 == "SC" || cods1 == "SE")
|
||||
{
|
||||
change_ca7(curr);
|
||||
curr.put("S1", "LA");
|
||||
cursore.file().rewrite();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void TConversione_archivi::change_ca7(TRectype& rec) const
|
||||
{
|
||||
const TString& cods1 = rec.get("S1");
|
||||
if (cods1 == "SC")
|
||||
{
|
||||
const TString olds2 = "AGHIKLMNPQRST";
|
||||
const char* news2 = "ABCDEFGHILMNZ";
|
||||
int pos2 = olds2.find(rec.get_char("S2"));
|
||||
if (pos2 >= 0)
|
||||
{
|
||||
rec.put("S2", news2[pos2]);
|
||||
rec.zero("S3");
|
||||
}
|
||||
}
|
||||
else // Ex Causale SE
|
||||
{
|
||||
const TString olds3 = "ABCDEFGT";
|
||||
const char* news3 = "QRSTUVWZ";
|
||||
int pos3 = olds3.find(rec.get_char("S3"));
|
||||
if (pos3 >= 0)
|
||||
{
|
||||
rec.put("S2", news3[pos3]);
|
||||
rec.zero("S3");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
// Effettua conversione campo QLCODQUA del file 42 (QUAL)
|
||||
////////////////////////////////////////////////////////////////
|
||||
void TConversione_archivi::convert_quadst() const
|
||||
{
|
||||
TRelation rel(LF_QUAL);
|
||||
TRectype& curr = rel.curr();
|
||||
TCursor cursore(&rel);
|
||||
const long items = cursore.items();
|
||||
cursore.freeze();
|
||||
|
||||
TProgind pi(items, "Conversione riepilogo quadro ST..", FALSE, TRUE);
|
||||
|
||||
for (cursore=0; cursore.pos()<items; ++cursore)
|
||||
{
|
||||
pi.addstatus(1);
|
||||
const TString& riepst = curr.get("QLCODQUA");
|
||||
if (riepst == "SC" || riepst == "SE")
|
||||
{
|
||||
curr.put("QLCODQUA", "LA");
|
||||
cursore.file().rewrite();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// Programma di conversione archivi speciale
|
||||
///////////////////////////////////////////////////////////
|
||||
@ -1730,7 +1821,7 @@ int main(int argc,char** argv)
|
||||
{
|
||||
const int r = (argc > 1) ? abs(atoi(argv[1])) : 0;
|
||||
|
||||
if (r < 0 || r > 19)
|
||||
if (r < 0 || r > 20)
|
||||
{
|
||||
error_box(usage);
|
||||
return 100;
|
||||
|
||||
@ -13,4 +13,4 @@ Tabella Cambi Giornalieri
|
||||
1|CODTAB[1,3]|@2g@3s
|
||||
1|D0|@15g@ld
|
||||
1|-200->S0|@30g@50,ls
|
||||
1|R10|@82g@15,rpn|##########,@@@@@@
|
||||
1|S4|@82g@15,rpn|#.###.###,@@@@@@
|
||||
|
||||
@ -28,7 +28,7 @@ Tabella Commesse
|
||||
3|B0|@26g@8f
|
||||
3|B2|@35g@9f
|
||||
3|B3|@45g@6f
|
||||
3|S4|@10g@8,ls
|
||||
3|S4|@52g@8,ls
|
||||
|
||||
[Translations]
|
||||
5|S7| |IVA normale
|
||||
|
||||
@ -93,13 +93,12 @@ real TCespite::un_milione() const
|
||||
static real million;
|
||||
if (million.is_zero())
|
||||
{
|
||||
million = 1000000.0;
|
||||
if (is_euro_value(""))
|
||||
{
|
||||
million /= 1936.27;
|
||||
million.round(2);
|
||||
}
|
||||
else
|
||||
million = 1000000.0;
|
||||
}
|
||||
return million;
|
||||
}
|
||||
@ -1821,7 +1820,7 @@ bool TCespite::calc_amm(int tipo_sit, const TDate& data_limite, bool recalc_spe_
|
||||
log("* Inizio calcolo situazione %d cespite %s", tipo_sit, (const char*)idcespite);
|
||||
|
||||
#ifdef DBG
|
||||
if (tipo_sit == 1 && atol(idcespite) == 5L)
|
||||
if (tipo_sit == 1 && atol(idcespite) == 10L)
|
||||
{
|
||||
tipo_sit = 1; // Put your breakpoint here
|
||||
}
|
||||
|
||||
@ -48,4 +48,11 @@
|
||||
#define FLD_CM1_DESCC 207
|
||||
#define FH_SOTTOCONTO 208
|
||||
|
||||
#endif // __CG0100_H
|
||||
#define FLD_CM2_CMSNEEDED 209
|
||||
#define FLD_CM2_CODCMS 210
|
||||
#define FLD_CM2_FASCMS 211
|
||||
#define FLD_CM2_DESCMS 212
|
||||
#define FLD_CM2_DESFAS 213
|
||||
|
||||
|
||||
#endif // __CG0100_H
|
||||
@ -407,7 +407,7 @@ END
|
||||
|
||||
BOOLEAN FLD_CM2_STSOTTBIL
|
||||
BEGIN
|
||||
PROMPT 1 16 "Non stampare dett.sottoc. su bilanci a sezioni"
|
||||
PROMPT 1 15 "Non stampare dett.sottoc. su bilanci a sezioni"
|
||||
HELP "Indicare se stampare il dettaglio dei sottoconti nei bilanci a sezioni contrapposte"
|
||||
FIELD LF_PCON->STSOTTBIL
|
||||
GROUP 1 3
|
||||
@ -415,7 +415,7 @@ END
|
||||
|
||||
BOOLEAN FLD_CM2_COMPENS
|
||||
BEGIN
|
||||
PROMPT 56 16 "Compensazione saldi"
|
||||
PROMPT 56 15 "Compensazione saldi"
|
||||
HELP "Indicare se e' ammessa la compensazione dei saldi"
|
||||
FIELD LF_PCON->COMPENS
|
||||
GROUP 1 3
|
||||
@ -423,7 +423,7 @@ END
|
||||
|
||||
BOOLEAN FLD_CM2_STSOTTAB
|
||||
BEGIN
|
||||
PROMPT 1 17 "Stampa dettaglio sottoconti su analisi"
|
||||
PROMPT 1 16 "Stampa dettaglio sottoconti su analisi"
|
||||
HELP "Indicare se stampare il dettaglio dei sottoconti nell'analisi di bilancio"
|
||||
FIELD LF_PCON->STSOTTAB
|
||||
// FLAGS "H"
|
||||
@ -433,7 +433,7 @@ END
|
||||
|
||||
BOOLEAN FLD_CM2_STSOTTABS
|
||||
BEGIN
|
||||
PROMPT 1 17 "Stampa dettaglio movimenti su analisi "
|
||||
PROMPT 1 16 "Stampa dettaglio movimenti su analisi "
|
||||
FIELD LF_PCON->STSOTTAB
|
||||
// FLAGS "H"
|
||||
GROUP 1 2
|
||||
@ -442,12 +442,80 @@ END
|
||||
|
||||
BOOLEAN FLD_CM2_SOSPESO
|
||||
BEGIN
|
||||
PROMPT 56 17 "Conto sospeso"
|
||||
PROMPT 56 16 "Conto sospeso"
|
||||
HELP "Indicare se sospendere il conto in prima nota"
|
||||
FIELD LF_PCON->SOSPESO
|
||||
GROUP 1 2
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 78 5
|
||||
BEGIN
|
||||
PROMPT 1 17 "@bCentri di costo / Commesse"
|
||||
GROUP 8
|
||||
END
|
||||
|
||||
BOOLEAN FLD_CM2_CMSNEEDED
|
||||
BEGIN
|
||||
PROMPT 2 18 "CDC/Commessa obbligatoria in prima nota"
|
||||
FIELD CMSNEEDED
|
||||
GROUP 8
|
||||
END
|
||||
|
||||
STRING FLD_CM2_CODCMS 20
|
||||
BEGIN
|
||||
PROMPT 2 19 "CDC/Commessa "
|
||||
FLAGS "UZ"
|
||||
USE CMS
|
||||
INPUT CODTAB FLD_CM2_CODCMS
|
||||
DISPLAY "Codice@20" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT FLD_CM2_CODCMS CODTAB
|
||||
OUTPUT FLD_CM2_DESCMS S0
|
||||
CHECKTYPE NORMAL
|
||||
FIELD CODCMS
|
||||
GROUP 8
|
||||
END
|
||||
|
||||
STRING FLD_CM2_DESCMS 50 36
|
||||
BEGIN
|
||||
PROMPT 39 19 ""
|
||||
USE CMS KEY 2
|
||||
INPUT S0 FLD_CM2_DESCMS
|
||||
DISPLAY "Descrizione@50" S0
|
||||
DISPLAY "Codice@20" CODTAB
|
||||
COPY OUTPUT FLD_CM2_CODCMS
|
||||
CHECKTYPE NORMAL
|
||||
GROUP 8
|
||||
END
|
||||
|
||||
STRING FLD_CM2_FASCMS 10
|
||||
BEGIN
|
||||
PROMPT 2 20 "Fase "
|
||||
FLAGS "UZ"
|
||||
USE FSC
|
||||
INPUT CODTAB FLD_CM2_FASCMS
|
||||
DISPLAY "Codice@10" CODTAB
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT FLD_CM2_FASCMS CODTAB
|
||||
OUTPUT FLD_CM2_DESFAS S0
|
||||
CHECKTYPE NORMAL
|
||||
FIELD FASCMS
|
||||
GROUP 8
|
||||
END
|
||||
|
||||
STRING FLD_CM2_DESFAS 50 36
|
||||
BEGIN
|
||||
PROMPT 39 20 ""
|
||||
USE FSC KEY 2
|
||||
INPUT S0 FLD_CM2_DESFAS
|
||||
DISPLAY "Descrizione@50" S0
|
||||
DISPLAY "Codice@20" CODTAB
|
||||
COPY OUTPUT FLD_CM2_FASCMS
|
||||
CHECKTYPE NORMAL
|
||||
GROUP 8
|
||||
END
|
||||
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
||||
ENDMASK
|
||||
@ -19,7 +19,7 @@
|
||||
#define F_COLL_CESP 116
|
||||
#define F_M_770 117
|
||||
#define F_COLL_PRIMANOTA 118
|
||||
#define F_SHEET_GCS 119
|
||||
#define F_SHEET_GCS 201
|
||||
#define F_TIPO_REG 120
|
||||
#define F_ANNOES 121
|
||||
#define F_TIPO_MOV 122
|
||||
|
||||
@ -239,17 +239,17 @@ BEGIN
|
||||
GROUP 1
|
||||
END
|
||||
|
||||
BUTTON DLG_OK 9 2
|
||||
BUTTON DLG_OK 10 2
|
||||
BEGIN
|
||||
PROMPT -13 -1 ""
|
||||
END
|
||||
|
||||
BUTTON DLG_CANCEL 9 2
|
||||
BUTTON DLG_CANCEL 10 2
|
||||
BEGIN
|
||||
PROMPT -23 -1 ""
|
||||
END
|
||||
|
||||
BUTTON SS_AZZERA 9 2
|
||||
BUTTON SS_AZZERA 10 2
|
||||
BEGIN
|
||||
PROMPT -33 -1 "A~zzera"
|
||||
MESSAGE RESET,1@
|
||||
|
||||
@ -3883,7 +3883,7 @@ bool TStampa_bilanci::set_print(int)
|
||||
_quadratura = m.get_bool(F_QUADRATURA);
|
||||
_noseparator = m.get_bool(F_SEPARATOR);
|
||||
|
||||
if (m.get(F_DACDC).not_empty() || m.get(F_ACDC).not_empty())
|
||||
if (m.field(F_DACDC).active() && (m.get(F_DACDC).not_empty() || m.get(F_ACDC).not_empty()))
|
||||
{
|
||||
TRelation cdcrel("CMS");
|
||||
TRectype da_cdc(cdcrel.curr()), a_cdc(cdcrel.curr());
|
||||
|
||||
@ -54,8 +54,10 @@ BEGIN
|
||||
OUTPUT F_ANNO CODTAB
|
||||
FLAGS "Z"
|
||||
CHECKTYPE NORMAL
|
||||
WARNING "L' esercizio non esiste"
|
||||
WARNING "L'esercizio non esiste"
|
||||
ADD RUN cg0 -5 esc
|
||||
MESSAGE EMPTY CLEAR,4@
|
||||
MESSAGE ENABLE,4@
|
||||
END
|
||||
|
||||
RADIOBUTTON F_BILANCIO 37
|
||||
|
||||
@ -338,7 +338,6 @@ bool TPrimanota_application::read_caus(const char* cod, int year)
|
||||
{
|
||||
error_box("Il conto della riga %d della causale e' %s",
|
||||
i, err == 1 ? "sconosciuto" : "sospeso");
|
||||
// continue; // Continua ugualmente
|
||||
}
|
||||
|
||||
const char sezione = rcaus->get_char(RCA_SEZIONE);
|
||||
@ -543,7 +542,7 @@ void TPrimanota_application::init_query_mode(TMask& m)
|
||||
}
|
||||
else
|
||||
{
|
||||
m.set(F_DATAREG, _last_dreg);
|
||||
m.set(F_DATAREG, _last_dreg);
|
||||
}
|
||||
|
||||
_incasso->_step = 0; // Azzera flag di incasso immediato
|
||||
@ -1620,7 +1619,6 @@ void TPrimanota_application::mask2ini(const TMask& msk, TConfig& ini)
|
||||
for (f = rec.items()-1; f >= 0; f--)
|
||||
{
|
||||
const char* name = rec.fieldname(f);
|
||||
CHECKD(name, "Dalle righe iva e' sparito il campo ", f);
|
||||
ini.set(name, rec.get(name));
|
||||
}
|
||||
}
|
||||
|
||||
283
cg/cg2102.cpp
283
cg/cg2102.cpp
@ -12,6 +12,7 @@
|
||||
|
||||
#include <clifo.h>
|
||||
#include <cfven.h>
|
||||
#include <pconti.h>
|
||||
|
||||
int TClinton::compare(const TSortable& obj) const
|
||||
{
|
||||
@ -213,7 +214,6 @@ int TPrimanota_application::clint2pos(const TClinton& conto, char tipo)
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Trova nelle righe contabili un conto di contropartita per il conto dato
|
||||
int TPrimanota_application::bill2contr(const TBill& conto, char sezione) const
|
||||
{
|
||||
@ -388,9 +388,8 @@ void TPrimanota_application::disable_cgs_cells(int n, char tipo)
|
||||
needs_update = TRUE;
|
||||
}
|
||||
|
||||
// Se disabilito il sottoconto alloro spengo anche le commesse
|
||||
if (cg.cell_disabled(n, 5))
|
||||
|
||||
// Se disabilito il sottoconto alloro spengo anche le commesse
|
||||
if (cg.cell_disabled(n, 5))
|
||||
{
|
||||
cg.disable_cell(n, CG_COMMESSA); // Commessa
|
||||
cg.disable_cell(n, CG_FASE); // Fase
|
||||
@ -449,9 +448,37 @@ int TPrimanota_application::set_cgs_row(int n, const TImporto& imp,
|
||||
else
|
||||
row.add(" | | | | ");
|
||||
}
|
||||
|
||||
row.add(cms, CG_COMMESSA-FIRST_FIELD);
|
||||
row.add(fas, CG_FASE-FIRST_FIELD);
|
||||
|
||||
if (conto.tipo() <= ' ') // Cerca di impostare la commessa sui conti normali
|
||||
{
|
||||
if (cms == NULL || *cms <= ' ')
|
||||
{
|
||||
if (row.get_char(CG_COMMESSA-FIRST_FIELD) <= ' ')
|
||||
{
|
||||
TString80 codcms, fascms;
|
||||
if (conto.default_cdc(codcms, fascms))
|
||||
{
|
||||
row.add(codcms, CG_COMMESSA-FIRST_FIELD);
|
||||
row.add(fascms, CG_FASE-FIRST_FIELD);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
row.add(cms, CG_COMMESSA-FIRST_FIELD);
|
||||
row.add(fas, CG_FASE-FIRST_FIELD);
|
||||
}
|
||||
cg.enable_cell(n, CG_COMMESSA); // Commessa
|
||||
cg.enable_cell(n, CG_FASE); // Fase
|
||||
}
|
||||
else // Azzera commessa sui conti clifo
|
||||
{
|
||||
row.add("", CG_COMMESSA-FIRST_FIELD);
|
||||
row.add("", CG_FASE-FIRST_FIELD);
|
||||
cg.disable_cell(n, CG_COMMESSA); // Commessa
|
||||
cg.disable_cell(n, CG_FASE); // Fase
|
||||
}
|
||||
|
||||
row.add(tipo, CG_ROWTYPE-FIRST_FIELD);
|
||||
|
||||
disable_cgs_cells(n, tipo);
|
||||
@ -596,7 +623,6 @@ HIDDEN bool imptot_error(const TImporto& imptot, const TImporto& impsal, bool va
|
||||
TString16 codval;
|
||||
if (val)
|
||||
codval = m.get(SK_VALUTA);
|
||||
|
||||
TCurrency euro(imptot.valore(), codval);
|
||||
|
||||
TString msg(255);
|
||||
@ -664,7 +690,7 @@ bool TPrimanota_application::cg_handler(TMask_field& f, KEY k)
|
||||
|
||||
if (!importo.is_zero())
|
||||
{
|
||||
const TBill c(r, 3, 0x0);
|
||||
const TBill c(r, 2, 0x1);
|
||||
if (!c.ok())
|
||||
return f.error_box("Il conto della riga %d non e' completo", i+1);
|
||||
if (m.insert_mode() && c.sospeso())
|
||||
@ -690,7 +716,6 @@ bool TPrimanota_application::cg_handler(TMask_field& f, KEY k)
|
||||
if (errato && a._as400 && speso.is_zero())
|
||||
errato = FALSE;
|
||||
|
||||
|
||||
if (nota && errato && speso.is_zero())
|
||||
{
|
||||
const int annorif = m.get_int(F_ANNORIF);
|
||||
@ -702,7 +727,6 @@ bool TPrimanota_application::cg_handler(TMask_field& f, KEY k)
|
||||
errato = !a.crea_partita(bill, annorif, numrif, currig, importo);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (errato)
|
||||
{
|
||||
@ -742,6 +766,19 @@ bool TPrimanota_application::cg_handler(TMask_field& f, KEY k)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// La commessa è vuota: controlliamo se era obbligatoria
|
||||
if (c.tipo() <= ' ' && *r.get(CG_COMMESSA-FIRST_FIELD) <= ' ')
|
||||
{
|
||||
TToken_string k = c.string();
|
||||
const TRectype& pc = cache().get(LF_PCON, k);
|
||||
if (pc.get_bool(PCN_CMSNEEDED))
|
||||
{
|
||||
k.replace('|', ' ');
|
||||
return f.error_box("Il codice commessa è obbligatorio per il conto %s della riga %d",
|
||||
(const char*)k, i+1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1228,6 +1265,13 @@ bool TPrimanota_application::codiva_handler(TMask_field& f, KEY key)
|
||||
const short id = b.tipo() == 'C' ? 209 : (b.tipo() == 'F' ? 309 : 109);
|
||||
m.set(id, b.sottoconto());
|
||||
m.set(id+1, b.descrizione());
|
||||
|
||||
TString80 codcms, fascms;
|
||||
if (b.default_cdc(codcms, fascms))
|
||||
{
|
||||
m.set(111, codcms, TRUE);
|
||||
m.set(112, fascms, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
if (app().iva() == iva_acquisti)
|
||||
@ -1488,7 +1532,7 @@ bool TPrimanota_application::iva_notify(TSheet_field& iva, int r, KEY k)
|
||||
if (!detrarre && !contoiva.ok()) // Se non c'e' il conto IVA indetraibile ...
|
||||
{ // ... somma imponibile e imposta
|
||||
imponibile += imposta;
|
||||
imposta = 0.0;
|
||||
imposta = ZERO;
|
||||
}
|
||||
|
||||
TImporto newimp = a.real2imp(imponibile, 'I');
|
||||
@ -1505,12 +1549,12 @@ bool TPrimanota_application::iva_notify(TSheet_field& iva, int r, KEY k)
|
||||
a.reset_cgs_row(delimp); // Cancella vecchia riga
|
||||
if (deliva > delimp) deliva--;
|
||||
}
|
||||
if (conto.ok() && !newimp.is_zero()) // Se c'e' imponibile ...
|
||||
{ // crea una nuova riga contabile
|
||||
|
||||
if (conto.ok() && !newimp.is_zero()) // Se c'e' imponibile ...
|
||||
{ // crea una nuova riga contabile
|
||||
if (saved_descr.blank())
|
||||
saved_descr = cau.desc_agg(2);
|
||||
newpos = a.set_cgs_row(-1, newimp, conto, saved_descr, 'I', conto.commessa(), conto.fase());
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -1606,7 +1650,7 @@ bool TPrimanota_application::iva_notify(TSheet_field& iva, int r, KEY k)
|
||||
|
||||
|
||||
// Handler dello sheet
|
||||
// Certified 90%
|
||||
// Certified 99%
|
||||
bool TPrimanota_application::iva_handler(TMask_field& f, KEY k)
|
||||
{
|
||||
if ((k == K_TAB && !f.mask().is_running()) || k == K_ENTER)
|
||||
@ -1680,6 +1724,22 @@ bool TPrimanota_application::cg_conto_handler(TMask_field& f, KEY key)
|
||||
{
|
||||
bool ok = TRUE;
|
||||
|
||||
if (key == K_TAB)
|
||||
{
|
||||
TMask& m = f.mask();
|
||||
if (m.field(CG_SOTTOCONTO).active()) // Controlla se sottoconto acceso
|
||||
{
|
||||
const char cf = m.get(CG_TIPO)[0]; // Tipo conto
|
||||
const bool enc = cf <= ' '; // Commessa ammessa per conti normali
|
||||
if (!enc)
|
||||
{
|
||||
m.reset(CG_COMMESSA);
|
||||
m.reset(CG_FASE);
|
||||
}
|
||||
m.enable(CG_COMMESSA, enc);
|
||||
m.enable(CG_FASE, enc);
|
||||
}
|
||||
}
|
||||
if (key == K_ENTER)
|
||||
{
|
||||
TMask& m = f.mask();
|
||||
@ -1706,9 +1766,10 @@ bool TPrimanota_application::iva_sottoconto_handler(TMask_field& f, KEY key)
|
||||
if (!suspended_handler(f, key))
|
||||
return FALSE;
|
||||
|
||||
TMask& m = f.mask();
|
||||
|
||||
if (key == K_TAB && f.dirty())
|
||||
{
|
||||
TMask& m = f.mask();
|
||||
const TEdit_field& e = (const TEdit_field&)f;
|
||||
const TRectype& piano = e.browse()->cursor()->curr();
|
||||
int spric = piano.get_int("TIPOSPRIC");
|
||||
@ -1723,10 +1784,68 @@ bool TPrimanota_application::iva_sottoconto_handler(TMask_field& f, KEY key)
|
||||
spric = 4;
|
||||
}
|
||||
}
|
||||
|
||||
TString s; if (spric > 0) s << spric;
|
||||
TString16 s; if (spric > 0) s << spric;
|
||||
m.set(105, s, TRUE); // Setta il campo spesa-ricavo della riga IVA
|
||||
}
|
||||
|
||||
if (!f.empty() && (key == K_ENTER || (key == K_TAB && f.dirty())))
|
||||
{
|
||||
TEdit_field& cdc = m.efield(111);
|
||||
if (cdc.active() && cdc.empty())
|
||||
{
|
||||
TBill zio; zio.get(m, 107, 108, 109);
|
||||
if (key == K_TAB)
|
||||
{
|
||||
TString80 cms, fas;
|
||||
if (zio.default_cdc(cms, fas))
|
||||
{
|
||||
m.set(111, cms, TRUE);
|
||||
m.set(112, fas, TRUE);
|
||||
}
|
||||
}
|
||||
TToken_string k = zio.string();
|
||||
const TRectype& pc = cache().get(LF_PCON, k);
|
||||
if (key == K_ENTER && cdc.empty() && pc.get_bool(PCN_CMSNEEDED))
|
||||
{
|
||||
k.replace(k.separator(), ' ');
|
||||
return cdc.error_box("Il conto %s richiede che sia specificato il codice CDC/Commessa",
|
||||
(const char*)k);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool TPrimanota_application::cg_sottoconto_handler(TMask_field& f, KEY k)
|
||||
{
|
||||
if (!suspended_handler(f, k))
|
||||
return FALSE;
|
||||
|
||||
if (!f.empty() && (k == K_ENTER || (k == K_TAB && f.dirty())))
|
||||
{
|
||||
TMask& m = f.mask();
|
||||
TEdit_field& cdc = m.efield(CG_COMMESSA);
|
||||
if (cdc.active() && cdc.empty())
|
||||
{
|
||||
TToken_string key;
|
||||
key.add(m.get(CG_GRUPPO)); key.add(m.get(CG_CONTO)); key.add(m.get(CG_SOTTOCONTO));
|
||||
|
||||
const TRectype& pc = cache().get(LF_PCON, key);
|
||||
if (k == K_TAB)
|
||||
{
|
||||
m.set(CG_COMMESSA, pc.get(PCN_CODCMS), TRUE);
|
||||
m.set(CG_FASE, pc.get(PCN_FASCMS), TRUE);
|
||||
}
|
||||
if (k == K_ENTER && cdc.empty() && pc.get_bool(PCN_CMSNEEDED))
|
||||
{
|
||||
key.replace(key.separator(), ' ');
|
||||
return cdc.error_box("Il conto %s richiede che sia specificato il codice CDC/Commessa",
|
||||
(const char*)key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -1780,65 +1899,51 @@ bool TPrimanota_application::num_handler(TMask_field& f, KEY key)
|
||||
a._skip_giornale_check = FALSE;
|
||||
a._skip_bollato_check = FALSE;
|
||||
|
||||
// const long max = a._lastreg+1;
|
||||
// const long num = f.empty() ? max : atol(f.get());
|
||||
// if (num < max)
|
||||
// {
|
||||
// if (a.find(1))
|
||||
if (!cache().get(LF_MOV, f.get()).empty())
|
||||
if (!cache().get(LF_MOV, f.get()).empty())
|
||||
{
|
||||
const TLocalisamfile& mov = a._rel->lfile();
|
||||
bool ok = TRUE;
|
||||
|
||||
if (mov.get_bool(MOV_STAMPATO))
|
||||
{
|
||||
const TLocalisamfile& mov = a._rel->lfile();
|
||||
bool ok = TRUE;
|
||||
ok = f.yesno_box("Il movimento e' gia' stato stampato sul libro giornale:\n"
|
||||
"si desidera continuare ugualmente?");
|
||||
a._skip_giornale_check = ok;
|
||||
}
|
||||
|
||||
if (mov.get_bool(MOV_STAMPATO))
|
||||
{
|
||||
ok = f.yesno_box("Il movimento e' gia' stato stampato sul libro giornale:\n"
|
||||
"si desidera continuare ugualmente?");
|
||||
a._skip_giornale_check = ok;
|
||||
}
|
||||
|
||||
if (ok && mov.get_bool(MOV_REGST))
|
||||
{
|
||||
ok = f.yesno_box("Il movimento e' gia' stato stampato sul bollato:\n"
|
||||
"si desidera continuare ugualmente?");
|
||||
a._skip_bollato_check = ok;
|
||||
}
|
||||
|
||||
if (ok && mov.get_bool(MOV_INVIATO))
|
||||
{
|
||||
ok = f.yesno_box("Il movimento e' stato inviato ad un'altra contabilita':\n"
|
||||
"si desidera continuare ugualmente?");
|
||||
}
|
||||
|
||||
if (ok)
|
||||
{
|
||||
// Riempie a mano i campi necessari nel caso non sia stato usata la ricerca F9
|
||||
m.set(F_DATAREG, mov.get(MOV_DATAREG), TRUE);
|
||||
// DATACOMP new way
|
||||
// m.set(F_DATACOMP, mov.get("DATACOMP"), TRUE);
|
||||
m.set(F_CODCAUS, mov.get(MOV_CODCAUS));
|
||||
|
||||
f.set_focusdirty(FALSE);
|
||||
ok = m.stop_run(K_AUTO_ENTER);
|
||||
}
|
||||
else
|
||||
{
|
||||
m.reset(F_NUMREG);
|
||||
if (a.lnflag())
|
||||
m.stop_run(K_FORCE_CLOSE);
|
||||
}
|
||||
return ok;
|
||||
if (ok && mov.get_bool(MOV_REGST))
|
||||
{
|
||||
ok = f.yesno_box("Il movimento e' gia' stato stampato sul bollato:\n"
|
||||
"si desidera continuare ugualmente?");
|
||||
a._skip_bollato_check = ok;
|
||||
}
|
||||
|
||||
if (ok && mov.get_bool(MOV_INVIATO))
|
||||
{
|
||||
ok = f.yesno_box("Il movimento e' stato inviato ad un'altra contabilita':\n"
|
||||
"si desidera continuare ugualmente?");
|
||||
}
|
||||
|
||||
if (ok)
|
||||
{
|
||||
// Riempie a mano i campi necessari nel caso non sia stato usata la ricerca F9
|
||||
m.set(F_DATAREG, mov.get(MOV_DATAREG), TRUE);
|
||||
// DATACOMP new way
|
||||
// m.set(F_DATACOMP, mov.get("DATACOMP"), TRUE);
|
||||
m.set(F_CODCAUS, mov.get(MOV_CODCAUS));
|
||||
|
||||
f.set_focusdirty(FALSE);
|
||||
ok = m.stop_run(K_AUTO_ENTER);
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
m.reset(F_NUMREG);
|
||||
if (a.lnflag())
|
||||
m.stop_run(K_FORCE_CLOSE);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
/* else if (num > max)
|
||||
{
|
||||
f.set(format("%ld", max));
|
||||
return f.error_box("Non e' possibile inserire movimenti superiori al %ld", max);
|
||||
} */
|
||||
// }
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -1852,24 +1957,14 @@ bool TPrimanota_application::caus_query_handler(TMask_field& f, KEY key)
|
||||
|
||||
if (f.to_check(key))
|
||||
{
|
||||
const TString8 cau = f.get();
|
||||
const TString cau = f.get();
|
||||
const int ann = m.get_int(F_ANNOIVA);
|
||||
|
||||
const TipoIVA i = app().cau2IVA(cau, ann); // Cerca causale e suo tipo
|
||||
if (i != iva_errata)
|
||||
{
|
||||
/* const bool ok = suspended_handler(f, key); // Controlla sospensione
|
||||
if (ok && key == K_TAB)
|
||||
{
|
||||
f.set_focusdirty(FALSE);
|
||||
return f.mask().stop_run(K_INS); // Entra in modo inserimento
|
||||
} */
|
||||
|
||||
}
|
||||
return suspended_handler(f, key); // Controlla sospensione
|
||||
else
|
||||
{
|
||||
return error_box("Causale non presente in archivio");
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
@ -1997,7 +2092,7 @@ bool TPrimanota_application::datareg_handler(TMask_field& f, KEY key)
|
||||
}
|
||||
|
||||
// Handler of the F_DATACOMP field on the modify mask
|
||||
// Certified 98%
|
||||
// Certified 90%
|
||||
bool TPrimanota_application::datacomp_handler(TMask_field& f, KEY key)
|
||||
{
|
||||
TMask& m = f.mask();
|
||||
@ -2028,17 +2123,16 @@ bool TPrimanota_application::datacomp_handler(TMask_field& f, KEY key)
|
||||
{
|
||||
bool ok = FALSE;
|
||||
const TString& ca = m.get(F_CODCAUS);
|
||||
if (ca.not_empty())
|
||||
if (ca.not_empty()) // Controlla ratei e risconti
|
||||
{
|
||||
TConfig ini(CONFIG_DITTA, "cg");
|
||||
const TString& ra = ini.get("RrCcRa");
|
||||
const TString& ri = ini.get("RrCcRi");
|
||||
ok = (ca == ra) || (ca == ri); // Se' e' una causale Ratei o Risconti
|
||||
ok = (ca == ra) || (ca == ri);
|
||||
}
|
||||
if (!ok)
|
||||
return f.error_box("La data di competenza non può superare la data di registrazione");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (ae)
|
||||
@ -2455,7 +2549,16 @@ bool TPrimanota_application::main_codiva_handler(TMask_field& f, KEY key)
|
||||
|
||||
TBill bill; // Aggiorna conto della prima riga IVA
|
||||
a.IVA2bill(iva, bill);
|
||||
bill.add_to(row, 4, 0x7);
|
||||
bill.add_to(row, 4, 0x7);
|
||||
if (bill.tipo() <= ' ' && bill.sottoconto() > 0)
|
||||
{
|
||||
TString80 cms, fas;
|
||||
if (bill.default_cdc(cms, fas))
|
||||
{
|
||||
row.add(cms, 10); // Cdc/commessa su riga IVA
|
||||
row.add(fas, 11); // Fase
|
||||
}
|
||||
}
|
||||
}
|
||||
a.ivas().force_update(0);
|
||||
|
||||
@ -2889,3 +2992,5 @@ bool TPrimanota_application::solaiva_handler(TMask_field& f, KEY key)
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -133,6 +133,7 @@ class TPrimanota_application : public TRelation_application
|
||||
static bool cg_tipo_handler(TMask_field& f, KEY key);
|
||||
static bool cg_gruppo_handler(TMask_field& f, KEY key);
|
||||
static bool cg_conto_handler(TMask_field& f, KEY key);
|
||||
static bool cg_sottoconto_handler(TMask_field& f, KEY key);
|
||||
|
||||
static bool codpag_handler(TMask_field& f, KEY key);
|
||||
static bool valuta_handler(TMask_field& f, KEY key);
|
||||
|
||||
114
cg/cg3100.cpp
114
cg/cg3100.cpp
@ -482,12 +482,12 @@ bool cdc_filter(const TRelation* rel)
|
||||
break;
|
||||
if (rmov.get(RMV_CODCMS) == cdc)
|
||||
{
|
||||
if (fsc.not_empty())
|
||||
ok = (rmov.get(RMV_FASCMS) == fsc);
|
||||
else
|
||||
ok = TRUE;
|
||||
if (ok)
|
||||
break;
|
||||
if (fsc.not_empty())
|
||||
ok = (rmov.get(RMV_FASCMS) == fsc);
|
||||
else
|
||||
ok = TRUE;
|
||||
if (ok)
|
||||
break;
|
||||
}
|
||||
}
|
||||
rmov.readat(oldpos);
|
||||
@ -776,9 +776,6 @@ void TListaMov_application::stampa_errori_mov()
|
||||
|
||||
void TListaMov_application::set_page(int file, int count)
|
||||
{
|
||||
|
||||
TString riga_commessa(132);
|
||||
riga_commessa.cut(0);
|
||||
switch (_tipo_lista)
|
||||
{
|
||||
case movimenti:
|
||||
@ -792,22 +789,22 @@ void TListaMov_application::set_page(int file, int count)
|
||||
{
|
||||
if (rec.get(RMV_CODCMS) == _cdc)
|
||||
{
|
||||
if (_fsc.not_empty())
|
||||
{
|
||||
if (rec.get(RMV_FASCMS) == _fsc)
|
||||
{
|
||||
if (!_cdc_only)
|
||||
set_row(_nr,"@0g@b"); // Grassettiamo le righe interessate
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_cdc_only)
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
if (!_cdc_only)
|
||||
set_row(_nr,"@0g@b"); // Grassettiamo le righe interessate
|
||||
if (_fsc.not_empty())
|
||||
{
|
||||
if (rec.get(RMV_FASCMS) == _fsc)
|
||||
{
|
||||
if (!_cdc_only)
|
||||
set_row(_nr,"@0g@b"); // Grassettiamo le righe interessate
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_cdc_only)
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
if (!_cdc_only)
|
||||
set_row(_nr,"@0g@b"); // Grassettiamo le righe interessate
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -828,24 +825,21 @@ void TListaMov_application::set_page(int file, int count)
|
||||
set_row(_nr,"@110g@n",FLD(LF_RMOV,RMV_IMPORTO));
|
||||
if (_print_cdc)
|
||||
{
|
||||
riga_commessa.cut(0);
|
||||
TString80 cms = rec.get(RMV_CODCMS);
|
||||
TString80 cms = rec.get(RMV_CODCMS);
|
||||
if (cms.not_empty())
|
||||
{
|
||||
riga_commessa = cms; riga_commessa.left_just(132);
|
||||
riga_commessa.overwrite(cache().get("CMS", cms, "S0"), 21);
|
||||
TString riga_commessa(132);
|
||||
riga_commessa << "@0g@b" << cms;
|
||||
riga_commessa << "@21g" << cache().get("CMS", cms, "S0");
|
||||
cms = rec.get(RMV_FASCMS);
|
||||
if (cms.not_empty())
|
||||
{
|
||||
riga_commessa.overwrite(cms, 72);
|
||||
riga_commessa.overwrite(cache().get("FSC", cms, "S0"), 93);
|
||||
riga_commessa << "@72g" << cms;
|
||||
riga_commessa << "@83g" << cache().get("FSC", cms, "S0");
|
||||
}
|
||||
set_row (_nr+1, riga_commessa);
|
||||
}
|
||||
if (riga_commessa.not_empty())
|
||||
{
|
||||
set_row (++_nr, riga_commessa);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (file == LF_MOV)
|
||||
{
|
||||
@ -1410,24 +1404,24 @@ print_action TListaMov_application::postprocess_page(int file,int count)
|
||||
//stampa i totali giornalieri
|
||||
if (!_cdc_only)
|
||||
{
|
||||
if ( FINITO ||
|
||||
(_datareg != datarec)||(_numreg == _numreg_fin))
|
||||
{
|
||||
if (( _scelta_stampa == 0 && _controllo_mov_errati != 1 && _decidi == 2) || (_scelta_stampa == 1 && _decidi == 2))
|
||||
{
|
||||
set_row(n, "@b@60gTotali del giorno %s", _datareg.string());
|
||||
set_row(n++, "@b@90g%r %r", &_tot_dare_giornaliero, &_tot_avere_giornaliero);
|
||||
_tot_avere_giornaliero = 0;
|
||||
_tot_dare_giornaliero = 0;
|
||||
}
|
||||
if ((_scelta_stampa == 0 && _controllo_mov_errati != 1 && FINITO) || (_scelta_stampa == 1 && FINITO))
|
||||
{
|
||||
set_row(n++,"");
|
||||
set_row(n, "@b@60gTotale generale");
|
||||
set_row(n++, "@b@90g%r %r", &_tot_dare_generale, &_tot_avere_generale);
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( FINITO ||
|
||||
(_datareg != datarec)||(_numreg == _numreg_fin))
|
||||
{
|
||||
if (( _scelta_stampa == 0 && _controllo_mov_errati != 1 && _decidi == 2) || (_scelta_stampa == 1 && _decidi == 2))
|
||||
{
|
||||
set_row(n, "@b@60gTotali del giorno %s", _datareg.string());
|
||||
set_row(n++, "@b@90g%r %r", &_tot_dare_giornaliero, &_tot_avere_giornaliero);
|
||||
_tot_avere_giornaliero = 0;
|
||||
_tot_dare_giornaliero = 0;
|
||||
}
|
||||
if ((_scelta_stampa == 0 && _controllo_mov_errati != 1 && FINITO) || (_scelta_stampa == 1 && FINITO))
|
||||
{
|
||||
set_row(n++,"");
|
||||
set_row(n, "@b@60gTotale generale");
|
||||
set_row(n++, "@b@90g%r %r", &_tot_dare_generale, &_tot_avere_generale);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (n == 1)
|
||||
{
|
||||
@ -2155,7 +2149,7 @@ bool TListaMov_application::set_print(int)
|
||||
_print_cdc = msk.get_bool(F_PRINTCDC);
|
||||
if (msk.get(F_DACDC).not_empty() || msk.get(F_ACDC).not_empty())
|
||||
{
|
||||
_cdc_only = msk.get_bool(F_CDC_ONLY);
|
||||
_cdc_only = msk.get_bool(F_CDC_ONLY);
|
||||
TRelation rel("CMS");
|
||||
TRectype darec(rel.curr()), arec(rel.curr());
|
||||
darec.put("CODTAB", msk.get(F_DACDC));
|
||||
@ -2180,15 +2174,15 @@ bool TListaMov_application::set_print(int)
|
||||
for (fsccur = 0L; fsccur.pos() < fsc_items; ++fsccur)
|
||||
{
|
||||
_fsc = fsccur.curr().get("CODTAB");
|
||||
imposta_parametri_stampa(msk);
|
||||
print();
|
||||
imposta_parametri_stampa(msk);
|
||||
print();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_fsc.cut(0);
|
||||
imposta_parametri_stampa(msk);
|
||||
print();
|
||||
imposta_parametri_stampa(msk);
|
||||
print();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2416,7 +2410,7 @@ void TListaMov_application::set_cdc_header(int& soh)
|
||||
else
|
||||
set_header(++soh, "@bCommessa %s %s", (const char*)_cdc, (const char*)desc_cdc);
|
||||
}
|
||||
/*
|
||||
/*
|
||||
if (_cdc.not_empty())
|
||||
{
|
||||
TString str;
|
||||
|
||||
149
cg/cg3200.cpp
149
cg/cg3200.cpp
@ -38,11 +38,11 @@ public:
|
||||
|
||||
const TString& TMastrini_record::get_str(const char* fieldname) const
|
||||
{
|
||||
if (stricmp(fieldname, "DESCR") == 0)
|
||||
if (strcmp(fieldname, "DESCR") == 0)
|
||||
{
|
||||
int g = atoi(TRectype::get_str("GRUPPO"));
|
||||
int c = atoi(TRectype::get_str("CONTO"));
|
||||
long s = atol(TRectype::get_str("SOTTOCONTO"));
|
||||
const int g = atoi(TRectype::get_str("GRUPPO"));
|
||||
const int c = atoi(TRectype::get_str("CONTO"));
|
||||
const long s = atol(TRectype::get_str("SOTTOCONTO"));
|
||||
((TBill&)_bill).set(g, c, s);
|
||||
const TString& descr = _bill.descrizione();
|
||||
return descr;
|
||||
@ -52,14 +52,14 @@ const TString& TMastrini_record::get_str(const char* fieldname) const
|
||||
|
||||
int TMastrini_record::length(const char* fieldname) const
|
||||
{
|
||||
if (stricmp(fieldname, "DESCR") == 0)
|
||||
if (strcmp(fieldname, "DESCR") == 0)
|
||||
return 50;
|
||||
return TRectype::length(fieldname);
|
||||
}
|
||||
|
||||
TFieldtypes TMastrini_record::type(const char* fieldname) const
|
||||
{
|
||||
if (stricmp(fieldname, "DESCR") == 0)
|
||||
if (strcmp(fieldname, "DESCR") == 0)
|
||||
return _alfafld;
|
||||
return TRectype::type(fieldname);
|
||||
}
|
||||
@ -69,6 +69,7 @@ class TMastrini_application : public TPrintapp
|
||||
static bool data_inizio (TMask_field& f, KEY k);
|
||||
static bool data_fine (TMask_field& f, KEY k);
|
||||
static bool gruppo_hnd (TMask_field& f, KEY k);
|
||||
static bool tipocf_hnd (TMask_field& f, KEY k);
|
||||
static bool contoi_hnd (TMask_field& f, KEY k);
|
||||
static bool contof_hnd (TMask_field& f, KEY k);
|
||||
static bool sottoc_handler_ini (TMask_field& f, KEY k);
|
||||
@ -136,6 +137,7 @@ class TMastrini_application : public TPrintapp
|
||||
|
||||
TString _cdc, _fsc, _riga_commessa;
|
||||
|
||||
|
||||
real _totale_commessa_dare, _totale_commessa_avere, _saldo_commessa;
|
||||
|
||||
|
||||
@ -203,7 +205,7 @@ public:
|
||||
void conto(int,int,bool);
|
||||
bool check_ordine(TMask_field& f, KEY k);
|
||||
|
||||
void setta_riga (int r, TString riga);
|
||||
void setta_riga (int r, const TString& riga);
|
||||
int righe_rimaste_da_stampare();
|
||||
|
||||
const char* trans(const char* italian);
|
||||
@ -478,6 +480,21 @@ bool TMastrini_application::gruppo_hnd (TMask_field& f, KEY k)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool TMastrini_application::tipocf_hnd (TMask_field& f, KEY k)
|
||||
{
|
||||
if (k == K_SPACE)
|
||||
{
|
||||
if (app().has_module(CMAUT))
|
||||
{
|
||||
TMask& m = f.mask();
|
||||
char ti = m.get(F_TIPOCF_INI)[0];
|
||||
char tf = m.get(F_TIPOCF_FINE)[0];
|
||||
m.show(-7, ti <= ' ' && tf <= ' ');
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool TMastrini_application::contoi_hnd (TMask_field& f, KEY k)
|
||||
{
|
||||
if (k == K_TAB && f.focusdirty() && f.mask().is_running())
|
||||
@ -485,15 +502,15 @@ bool TMastrini_application::contoi_hnd (TMask_field& f, KEY k)
|
||||
TMask& m = f.mask();
|
||||
TLocalisamfile pconti (LF_PCON);
|
||||
TString ds;
|
||||
const short id = f.dlg();
|
||||
const int gruppo = m.get_int(F_GRUPPOINI);
|
||||
const int conto = m.get_int(id);
|
||||
const short id = f.dlg();
|
||||
const int gruppo = m.get_int(F_GRUPPOINI);
|
||||
const int conto = m.get_int(id);
|
||||
|
||||
if (gruppo != 0 && conto != 0 && m.field(F_DESCRINI_CONTO).empty())
|
||||
{
|
||||
bool warning;
|
||||
|
||||
char tipomsk = m.get(F_TIPOCF_INI)[0];
|
||||
const char tipomsk = m.get(F_TIPOCF_INI)[0];
|
||||
|
||||
pconti.zero();
|
||||
pconti.put(PCN_GRUPPO, gruppo) ;
|
||||
@ -537,23 +554,24 @@ bool TMastrini_application::contoi_hnd (TMask_field& f, KEY k)
|
||||
bool TMastrini_application::contof_hnd (TMask_field& f, KEY k)
|
||||
{
|
||||
const short id = f.dlg();
|
||||
TMask& m = f.mask();
|
||||
|
||||
if (k == K_ENTER)
|
||||
{
|
||||
int gruppof = f.mask().get_int(F_GRUPPOFINE);
|
||||
int gruppof = m.get_int(F_GRUPPOFINE);
|
||||
|
||||
if (gruppof == 0)
|
||||
return TRUE;
|
||||
|
||||
char tipo = f.mask().get(F_TIPOCF_INI)[0];
|
||||
char tipo = m.get(F_TIPOCF_INI)[0];
|
||||
|
||||
int gruppoi = f.mask().get_int(F_GRUPPOINI);
|
||||
int gruppoi = m.get_int(F_GRUPPOINI);
|
||||
|
||||
if (gruppoi < gruppof)
|
||||
return TRUE;
|
||||
|
||||
int contof = f.mask().get_int(id);
|
||||
int contoi = f.mask().get_int(F_CONTOINI_CONTO);
|
||||
int contof = m.get_int(id);
|
||||
int contoi = m.get_int(F_CONTOINI_CONTO);
|
||||
|
||||
if (contoi > contof)
|
||||
return f.error_box("Il conto di partenza deve essere inferiore o uguale al conto di arrivo");
|
||||
@ -563,13 +581,17 @@ bool TMastrini_application::contof_hnd (TMask_field& f, KEY k)
|
||||
{
|
||||
TLocalisamfile pconti (LF_PCON);
|
||||
TString ds;
|
||||
int gruppo = f.mask().get_int(F_GRUPPOFINE);
|
||||
int conto = f.mask().get_int(id);
|
||||
if (gruppo != 0 && conto != 0 && f.mask().field(F_DESCRFINE_CONTO).empty())
|
||||
int gruppo = m.get_int(F_GRUPPOFINE);
|
||||
int conto = m.get_int(id);
|
||||
|
||||
if (app().has_module(CMAUT))
|
||||
m.show(-7, m.get(F_TIPOCF_FINE)[0] <= ' ');
|
||||
|
||||
if (gruppo != 0 && conto != 0 && m.field(F_DESCRFINE_CONTO).empty())
|
||||
{
|
||||
bool warning;
|
||||
|
||||
char tipomsk = f.mask().get(F_TIPOCF_FINE)[0];
|
||||
char tipomsk = m.get(F_TIPOCF_FINE)[0];
|
||||
|
||||
pconti.zero();
|
||||
pconti.put(PCN_GRUPPO, gruppo) ;
|
||||
@ -591,9 +613,9 @@ bool TMastrini_application::contof_hnd (TMask_field& f, KEY k)
|
||||
warning = TRUE;
|
||||
}
|
||||
|
||||
f.mask().set(F_DESCRFINE_CLIENTE, ds);
|
||||
f.mask().set(F_DESCRFINE_FORN, ds);
|
||||
f.mask().set(F_DESCRFINE_CONTO, ds);
|
||||
m.set(F_DESCRFINE_CLIENTE, ds);
|
||||
m.set(F_DESCRFINE_FORN, ds);
|
||||
m.set(F_DESCRFINE_CONTO, ds);
|
||||
|
||||
if (warning)
|
||||
return f.warning_box("Conto inesistente");
|
||||
@ -943,9 +965,6 @@ void TMastrini_application::fai_stampa132()
|
||||
set_row (_rw,"@38g#3t", &_codcaus);
|
||||
|
||||
set_row (_rw,"@117g#t #t #t", &_g_contr, &_c_contr, &_s_contr);
|
||||
|
||||
if (_riga_commessa.not_empty())
|
||||
set_row (++_rw, _riga_commessa);
|
||||
}
|
||||
|
||||
void TMastrini_application::fai_stampa198()
|
||||
@ -1475,19 +1494,20 @@ void TMastrini_application::stampa_totali198_II()
|
||||
_devi_stampare_footer = FALSE;
|
||||
}
|
||||
|
||||
void TMastrini_application::setta_riga (int r, TString riga)
|
||||
void TMastrini_application::setta_riga (int r, const TString& riga)
|
||||
{
|
||||
TString *p = (TString*)_riga.objptr(r);
|
||||
if (!p)
|
||||
{
|
||||
p = new TString;
|
||||
_riga.add (p);
|
||||
}
|
||||
*p << riga;
|
||||
TString* p = (TString*)_riga.objptr(r);
|
||||
if (p == NULL)
|
||||
_riga.add(riga);
|
||||
else
|
||||
*p << riga;
|
||||
}
|
||||
|
||||
bool TMastrini_application::preprocess_page(int file, int counter)
|
||||
{
|
||||
if (counter)
|
||||
return TRUE;
|
||||
|
||||
TLocalisamfile & rmov = current_cursor()->file(LF_RMOV);
|
||||
long rec;
|
||||
TDate datasucc;
|
||||
@ -1497,9 +1517,6 @@ bool TMastrini_application::preprocess_page(int file, int counter)
|
||||
TString provvis = "";
|
||||
int annoes;
|
||||
|
||||
if (counter)
|
||||
return TRUE;
|
||||
|
||||
switch (file)
|
||||
{
|
||||
case LF_SALDI:
|
||||
@ -1644,23 +1661,6 @@ bool TMastrini_application::preprocess_page(int file, int counter)
|
||||
_c_contr = rmov.get(RMV_CONTOC);
|
||||
_s_contr = rmov.get(RMV_SOTTOCONTOC);
|
||||
|
||||
_riga_commessa.cut(0);
|
||||
if (_print_cdc)
|
||||
{
|
||||
TString80 cms = rmov.get(RMV_CODCMS);
|
||||
if (cms.not_empty())
|
||||
{
|
||||
_riga_commessa = cms; _riga_commessa.left_just(132);
|
||||
_riga_commessa.overwrite(cache().get("CMS", cms, "S0"), 21);
|
||||
cms = rmov.get(RMV_FASCMS);
|
||||
if (cms.not_empty())
|
||||
{
|
||||
_riga_commessa.overwrite(cms, 72);
|
||||
_riga_commessa.overwrite(cache().get("FSC", cms, "S0"), 93);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Stampa solo quelli che hanno anno esercizio uguale a quello specificato
|
||||
// nella maschera. Se non viene specificato li stampa tutti
|
||||
|
||||
@ -1736,7 +1736,9 @@ bool TMastrini_application::preprocess_page(int file, int counter)
|
||||
_numgio = _mov->get_long(MOV_NUMGIO);
|
||||
|
||||
_descrizione = rmov.get(RMV_DESCR);
|
||||
|
||||
|
||||
_d18->cut(0); _d22->cut(0); _d30->cut(0);
|
||||
|
||||
if (_nummast == 1 || _nummast == 3)
|
||||
{
|
||||
if (_numcarat == 1) // Stampa 132 caratteri
|
||||
@ -1922,7 +1924,7 @@ bool TMastrini_application::preprocess_page(int file, int counter)
|
||||
i = 0;
|
||||
while ( (str = d_30.get()) != NULL)
|
||||
{
|
||||
TString stringa = "";
|
||||
TString stringa;
|
||||
stringa << "@70g" << str;
|
||||
setta_riga(i,stringa);
|
||||
i++;
|
||||
@ -2083,7 +2085,26 @@ bool TMastrini_application::preprocess_page(int file, int counter)
|
||||
}
|
||||
//_riga.destroy();
|
||||
} //if (_nummast == 2)
|
||||
|
||||
|
||||
if (_print_cdc)
|
||||
{
|
||||
const TString& cms = rmov.get(RMV_CODCMS);
|
||||
if (cms.not_empty())
|
||||
{
|
||||
TString riga_commessa;
|
||||
riga_commessa << "@0g@b" << cms;
|
||||
riga_commessa << "@21g" << cache().get("CMS", cms, "S0");
|
||||
const TString& fas = rmov.get(RMV_FASCMS);
|
||||
if (fas.not_empty())
|
||||
{
|
||||
riga_commessa << "@72g" << fas;
|
||||
riga_commessa << "@83g" << cache().get("FSC", fas, "S0");
|
||||
}
|
||||
const int jump = max(_d18->items(), max(_d22->items(), _d30->items()));
|
||||
set_row (_rw+jump, riga_commessa);
|
||||
}
|
||||
}
|
||||
|
||||
if (_sezione == "D")
|
||||
{
|
||||
_totale_periodo_dare += _importo;
|
||||
@ -2160,7 +2181,7 @@ bool TMastrini_application::preprocess_page(int file, int counter)
|
||||
if (!_stampa_des_contro)
|
||||
set_row (_rw,"@135g%r", &saldo_prog);
|
||||
}
|
||||
|
||||
|
||||
rmov.readat(rec);
|
||||
}
|
||||
else
|
||||
@ -2661,6 +2682,7 @@ bool TMastrini_application::set_print(int m)
|
||||
while (need_to_repeat_print());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -4090,12 +4112,10 @@ void TMastrini_application::set_handlers(TMask* msk) const
|
||||
msk->set_handler(F_DATAINI, data_inizio);
|
||||
msk->set_handler(F_DATAFINE, data_fine);
|
||||
msk->set_handler(F_GRUPPOFINE, gruppo_hnd);
|
||||
msk->set_handler(F_TIPOCF_INI, tipocf_hnd);
|
||||
msk->set_handler(F_TIPOCF_FINE, tipocf_hnd);
|
||||
msk->set_handler(F_CONTOINI_CONTO, contoi_hnd);
|
||||
// msk->set_handler(F_CONTOINI_CLIENTE, contoi_hnd);
|
||||
// msk->set_handler(F_CONTOINI_FORN, contoi_hnd);
|
||||
msk->set_handler(F_CONTOFINE_CONTO, contof_hnd);
|
||||
// msk->set_handler(F_CONTOFINE_CLIENTE, contof_hnd);
|
||||
// msk->set_handler(F_CONTOFINE_FORN, contof_hnd);
|
||||
|
||||
msk->set_handler(F_SOTTOCINI_CONTO, sottoc_handler_ini);
|
||||
msk->set_handler(F_SOTTOCINI_CLIENTE, sottoc_handler_ini);
|
||||
@ -4170,6 +4190,9 @@ bool TMastrini_application::user_create()
|
||||
exp.add("CONTO=CONTO");
|
||||
exp.add("SOTTOCONTO=SOTTOCONTO");
|
||||
_rel->add(LF_RMOV,exp,2,LF_SALDI);
|
||||
|
||||
_rel->add("CMS", "CODTAB==CODCMS", 1, LF_RMOV, 501);
|
||||
_rel->add("FSC", "CODTAB==FASCMS", 1, LF_RMOV, 502);
|
||||
|
||||
_cur1=add_cursor(new TCursor(_rel,"FLSCA=\" \"",2));
|
||||
_cur2=add_cursor(new TSorted_cursor(_rel,"DESCR","FLSCA=\" \"",2));
|
||||
@ -4238,4 +4261,4 @@ int cg3200(int argc, char* argv[])
|
||||
TMastrini_application a;
|
||||
a.run(argc, argv, "Stampa Mastrini");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -460,7 +460,7 @@ END
|
||||
BOOLEAN F_PRINTCDC
|
||||
BEGIN
|
||||
PROMPT 5 18 "Stampa Centro di costo/Commessa e Fase relativa ad ogni riga"
|
||||
GROUP 7 8
|
||||
GROUP 7
|
||||
END
|
||||
|
||||
STRING F_DACDC 20
|
||||
@ -474,6 +474,7 @@ BEGIN
|
||||
OUTPUT F_DACDC CODTAB
|
||||
CHECKTYPE SEARCH
|
||||
GROUP 7 8
|
||||
|
||||
END
|
||||
|
||||
STRING F_DAFSC 10
|
||||
@ -486,7 +487,8 @@ BEGIN
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT F_DAFSC CODTAB
|
||||
CHECKTYPE SEARCH
|
||||
GROUP 7 8
|
||||
GROUP 7
|
||||
|
||||
END
|
||||
|
||||
STRING F_ACDC 20
|
||||
@ -498,7 +500,8 @@ BEGIN
|
||||
COPY DISPLAY F_DACDC
|
||||
OUTPUT F_ACDC CODTAB
|
||||
CHECKTYPE SEARCH
|
||||
GROUP 7 8
|
||||
GROUP 7
|
||||
|
||||
END
|
||||
|
||||
STRING F_AFSC 10
|
||||
@ -510,7 +513,8 @@ BEGIN
|
||||
COPY DISPLAY F_DAFSC
|
||||
OUTPUT F_AFSC CODTAB
|
||||
CHECKTYPE SEARCH
|
||||
GROUP 7 8
|
||||
GROUP 7
|
||||
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
@ -984,7 +988,7 @@ BEGIN
|
||||
DISPLAY "Descrizione@70" S0
|
||||
OUTPUT F_DACDC CODTAB
|
||||
CHECKTYPE SEARCH
|
||||
GROUP 7 8
|
||||
|
||||
END
|
||||
|
||||
STRING F_DAFSC 10
|
||||
@ -997,7 +1001,7 @@ BEGIN
|
||||
DISPLAY "Descrizione@70" S0
|
||||
OUTPUT F_DAFSC CODTAB
|
||||
CHECKTYPE SEARCH
|
||||
GROUP 7 8
|
||||
|
||||
END
|
||||
|
||||
STRING F_ACDC 20
|
||||
@ -1009,7 +1013,7 @@ BEGIN
|
||||
COPY DISPLAY F_DACDC
|
||||
OUTPUT F_ACDC CODTAB
|
||||
CHECKTYPE SEARCH
|
||||
GROUP 7 8
|
||||
|
||||
END
|
||||
|
||||
STRING F_AFSC 10
|
||||
@ -1021,7 +1025,7 @@ BEGIN
|
||||
COPY DISPLAY F_DAFSC
|
||||
OUTPUT F_AFSC CODTAB
|
||||
CHECKTYPE SEARCH
|
||||
GROUP 7 8
|
||||
|
||||
END
|
||||
|
||||
BUTTON DLG_OK 10 2
|
||||
@ -1042,4 +1046,4 @@ END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
||||
ENDMASK
|
||||
@ -994,7 +994,7 @@ void TRic_tab::scrivi_righePN(long numreg)
|
||||
_sld.aggiorna(g,c,s,imp,sez);
|
||||
}
|
||||
}
|
||||
|
||||
// Ricezione Saldaconto da Sistema e PC: da file temporanei a file reali
|
||||
void TRic_tab::ricevi_movPN(TString& key, char uselab)
|
||||
{
|
||||
TString str;
|
||||
@ -1464,23 +1464,28 @@ void TRic_tab::ricevi_movSC(TString& key, char uselab)
|
||||
_tscad->put(SCAD_NUMPART, numpart);
|
||||
_tscad->put(SCAD_NRIGA, nriga);
|
||||
|
||||
TRectype scad (_tscad->curr());
|
||||
const TRectype scad = _tscad->curr();
|
||||
|
||||
for (_tscad->read(_isgteq); !_tscad->eof(); _tscad->next())
|
||||
{
|
||||
TString rec = scad.get(SCAD_NUMPART);
|
||||
TString file = _tscad->get(SCAD_NUMPART);
|
||||
const TString16 rec = scad.get(SCAD_NUMPART);
|
||||
const TString16 file = _tscad->get(SCAD_NUMPART);
|
||||
|
||||
if (_tscad->curr() != scad || file != rec) break;
|
||||
if (_tscad->curr() != scad || file != rec)
|
||||
break;
|
||||
|
||||
TRiga_scadenze& scadenza = partita.new_row();
|
||||
|
||||
scadenza.put(SCAD_CODPAG, _tscad->get (SCAD_CODPAG));
|
||||
scadenza.put(SCAD_TIPOPAG, _tscad->get_int (SCAD_TIPOPAG));
|
||||
scadenza.put(SCAD_ULTCLASS, _tscad->get (SCAD_ULTCLASS));
|
||||
scadenza.put(SCAD_IMPORTO, _tscad->get_real(SCAD_IMPORTO));
|
||||
scadenza.put(SCAD_IMPORTOVAL, _tscad->get_real(SCAD_IMPORTOVAL));
|
||||
scadenza.put(SCAD_DATASCAD, _tscad->get_date(SCAD_DATASCAD));
|
||||
scadenza.put(SCAD_CODPAG, _tscad->get (SCAD_CODPAG));
|
||||
scadenza.put(SCAD_TIPOPAG, _tscad->get_int (SCAD_TIPOPAG));
|
||||
scadenza.put(SCAD_ULTCLASS, _tscad->get (SCAD_ULTCLASS));
|
||||
scadenza.put(SCAD_IMPORTO, _tscad->get_real(SCAD_IMPORTO));
|
||||
scadenza.put(SCAD_IMPORTOVAL, _tscad->get_real(SCAD_IMPORTOVAL));
|
||||
scadenza.put(SCAD_DATASCAD, _tscad->get_date(SCAD_DATASCAD));
|
||||
scadenza.put(SCAD_CODABIPR, _tscad->get(SCAD_CODABIPR));
|
||||
scadenza.put(SCAD_CODCABPR, _tscad->get(SCAD_CODCABPR));
|
||||
scadenza.put(SCAD_CODABI, _tscad->get(SCAD_CODABI));
|
||||
scadenza.put(SCAD_CODCAB, _tscad->get(SCAD_CODCAB));
|
||||
int nrata = _tscad->get_int(SCAD_NRATA);
|
||||
int nuova_rata = scadenza.get_int(SCAD_NRATA);
|
||||
aggiorna_temp_scad(tipocf,gruppo,conto,codcf,anno,numpart,nriga,nrata,nuova_riga,nuova_rata);
|
||||
|
||||
@ -974,4 +974,20 @@ const char* TBill::string(int mode) const
|
||||
return s;
|
||||
}
|
||||
|
||||
bool TBill::default_cdc(TString& cdc, TString& fas) const
|
||||
{
|
||||
bool ok = tipo() <= ' ' && sottoconto() > 0;
|
||||
if (ok)
|
||||
{
|
||||
TString16 key; key.format("%d|%d|%ld", gruppo(), conto(), sottoconto());
|
||||
const TRectype& pcon = cache().get(LF_PCON, key);
|
||||
ok = !pcon.empty();
|
||||
if (ok)
|
||||
{
|
||||
cdc = pcon.get(PCN_CODCMS);
|
||||
fas = pcon.get(PCN_FASCMS);
|
||||
}
|
||||
}
|
||||
return ok && cdc.not_empty();
|
||||
}
|
||||
|
||||
|
||||
@ -236,6 +236,8 @@ public:
|
||||
void get(const TMask& m, short g, short c, short s, short t = 0, short d = 0);
|
||||
|
||||
const char* string(int mode = 0) const;
|
||||
|
||||
bool default_cdc(TString& cdc, TString& fas) const;
|
||||
};
|
||||
|
||||
enum TIndbil { ib_null, ib_attivita, ib_passivita, ib_costi, ib_ricavi, ib_conti_ordine };
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
19
|
||||
0
|
||||
$pcon|0|0|110|0|Piano dei conti|NCON||
|
||||
$pcon|0|0|141|0|Piano dei conti|NCON||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
19
|
||||
23
|
||||
26
|
||||
GRUPPO|2|3|0|Codice del gruppo
|
||||
CONTO|2|3|0|Codice del conto
|
||||
SOTTOCONTO|3|6|0|Codice del sottoconto
|
||||
@ -23,6 +23,9 @@ NUMRIVDOPP|1|8|0|Numero romano di sezione opposta IV direttiva CEE
|
||||
NUMIVDOPP|2|2|0|Numero di sezione opposta IV direttiva CEE
|
||||
RICSER|2|1|0|Ricavi per servizi
|
||||
IVACOMP|1|4|0|Codice IVA di compensazione per regimi agricoli
|
||||
CMSNEEDED|8|1|0|Codice cdc/commessa obbligatorio in prima nota
|
||||
CODCMS|1|20|0|Codice cdc/commessa predefinito
|
||||
FASCMS|1|10|0|Codice fase predefinito
|
||||
2
|
||||
GRUPPO+CONTO+SOTTOCONTO|
|
||||
UPPER(DESCR)|X
|
||||
|
||||
@ -475,52 +475,71 @@ void TArticolo_giacenza_static::calcola_ordinato_documento(TRectype& rec)
|
||||
CHECK(rec.num() == LF_DOC, "E' necessario passare un record di LF_DOC");
|
||||
|
||||
TRectype from(LF_RIGHEDOC), to(LF_RIGHEDOC);
|
||||
|
||||
TString filter;
|
||||
|
||||
filter = "CODART==\"";
|
||||
filter << codice() << "\"";
|
||||
|
||||
int nkey = 1;
|
||||
|
||||
from.zero();
|
||||
from.put(RDOC_CODNUM, rec.get(DOC_CODNUM));
|
||||
from.put(RDOC_ANNO, rec.get(DOC_ANNO));
|
||||
from.put(RDOC_PROVV, rec.get(DOC_PROVV));
|
||||
from.put(RDOC_NDOC, rec.get(DOC_NDOC)); // Se NDOC non è settato effettua il filtro su tutti i documenti di questa numerazione
|
||||
|
||||
// Se NDOC non è settato effettua il filtro su tutti i documenti di questa numerazione
|
||||
const long ndoc = rec.get_long(DOC_NDOC);
|
||||
if (ndoc > 0)
|
||||
{
|
||||
from.put(RDOC_NDOC, ndoc);
|
||||
filter = "CODART==\"";
|
||||
filter << codice() << "\"";
|
||||
}
|
||||
else
|
||||
{
|
||||
nkey = 2;
|
||||
from.put(RDOC_CODART, codice());
|
||||
}
|
||||
|
||||
to = from;
|
||||
|
||||
TRelation rdoc(LF_RIGHEDOC);
|
||||
TCursor cur(&rdoc, filter, 1, &from, &to);
|
||||
TCursor cur(&rdoc, filter, nkey, &from, &to);
|
||||
const TRecnotype items = cur.items();
|
||||
TProgind *pi = NULL;
|
||||
real val;
|
||||
|
||||
filter = "Calcolo ordinato fornitori in corso. ";
|
||||
filter << rec.get(DOC_CODNUM);
|
||||
filter << "/" << codice();
|
||||
|
||||
if (items > 10)
|
||||
pi = new TProgind(items, filter, FALSE, TRUE);
|
||||
if (items > 0)
|
||||
{
|
||||
cur.freeze();
|
||||
TProgind *pi = NULL;
|
||||
|
||||
filter = "Calcolo ordinato fornitori in corso. ";
|
||||
filter << rec.get(DOC_CODNUM);
|
||||
filter << "/" << codice();
|
||||
|
||||
for (cur = 0L; cur.pos() < items; ++cur)
|
||||
{
|
||||
// Calcola la qta residua
|
||||
if (pi) pi->addstatus(1L);
|
||||
|
||||
TRectype& rec = cur.curr();
|
||||
if (!rec.get_bool(RDOC_RIGAEVASA))
|
||||
if (items > 10)
|
||||
pi = new TProgind(items, filter, FALSE, TRUE);
|
||||
|
||||
for (cur = 0L; cur.pos() < items; ++cur)
|
||||
{
|
||||
val = rec.get_real(RDOC_QTA) - rec.get_real(RDOC_QTAEVASA);
|
||||
// Converte il valore della quantità in UM base
|
||||
val = convert_to_um(val, _umbase, rec.get(RDOC_UMQTA));
|
||||
if (val < ZERO)
|
||||
val = ZERO;
|
||||
// Calcola la qta residua
|
||||
if (pi) pi->addstatus(1L);
|
||||
|
||||
const TRectype& rec = cur.curr();
|
||||
if (!rec.get_bool(RDOC_RIGAEVASA))
|
||||
{
|
||||
real val = rec.get_real(RDOC_QTA) - rec.get_real(RDOC_QTAEVASA);
|
||||
// Converte il valore della quantità in UM base
|
||||
val = convert_to_um(val, _umbase, rec.get(RDOC_UMQTA));
|
||||
if (val > ZERO)
|
||||
{
|
||||
// Aggiorna il valore ordinato del periodo relativo
|
||||
real& rr = (real&) _ordinato_fornitori[app().date2period(rec.get_date(RDOC_DATACONS))];
|
||||
rr += val;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Aggiorna il valore ordinato del periodo relativo
|
||||
real& rr = (real&) _ordinato_fornitori[app().date2period(rec.get_date(RDOC_DATACONS))];
|
||||
rr += val;
|
||||
|
||||
if (pi)
|
||||
delete pi;
|
||||
}
|
||||
|
||||
if (pi)
|
||||
delete pi;
|
||||
}
|
||||
|
||||
void TArticolo_giacenza_static::calc_ordinato_fornitori(_ParmStruct* p, const char * codmag, const char * livello)
|
||||
|
||||
@ -263,7 +263,7 @@ const TString& TConfig::get(
|
||||
// @xref <mf TConfig::get_long> <mf TConfig::get_int> <mf TConfig::get_bool>
|
||||
// <mf TConfig::get_color>
|
||||
{
|
||||
if (section) // Cambia paragrafo se necessario
|
||||
if (section && *section) // Cambia paragrafo se necessario
|
||||
set_paragraph(section);
|
||||
|
||||
const TString* val;
|
||||
|
||||
@ -123,7 +123,7 @@ public:
|
||||
void remove_all();
|
||||
|
||||
// @cmember Controlla se il paragrafo corrente e' nuovo (TRUE se nuovo)
|
||||
bool new_paragraph()
|
||||
bool new_paragraph() const
|
||||
{ return !_ispresent; }
|
||||
|
||||
// @cmember Ritorna quanti elementi dell'array nominato sono presenti nella
|
||||
|
||||
@ -1891,7 +1891,7 @@ int TSystemisamfile::exec_convapp(
|
||||
TToken_string s(conv.get(v, NULL, num()), ' ');
|
||||
TFilename f(s.get(0));
|
||||
f.ext(".exe");
|
||||
s << " " << prefix().get_codditta();
|
||||
s << ' ' << prefix().get_codditta();
|
||||
TExternal_app app(s);
|
||||
if (f.exist())
|
||||
{
|
||||
|
||||
@ -152,8 +152,10 @@
|
||||
#define LF_MOVAM 141
|
||||
#define LF_MOVCE 142
|
||||
#define LF_SALCE 143
|
||||
#define LF_QUALA 144
|
||||
|
||||
#define LF_EXTERNAL 1000 // Files with id >= are considered to be externals
|
||||
|
||||
#define CNF_GENERAL 10000
|
||||
#define CNF_STUDIO CNF_GENERAL + 1
|
||||
#define CNF_DITTA CNF_GENERAL + 2
|
||||
@ -167,4 +169,3 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -88,12 +88,13 @@ TMask::TMask()
|
||||
|
||||
|
||||
TMask::TMask(const char* title, int pages, int cols, int rows,
|
||||
int xpos, int ypos)
|
||||
int xpos, int ypos, WINDOW parent)
|
||||
: _mask_num(0)
|
||||
|
||||
{
|
||||
init_mask();
|
||||
for (_pages = 0; _pages < pages; _pages++)
|
||||
_pagewin[_pages] = create_interface(NULL_WIN, xpos, ypos,
|
||||
_pagewin[_pages] = create_interface(parent, xpos, ypos,
|
||||
cols, rows, title, this, pages > 1);
|
||||
}
|
||||
|
||||
@ -356,7 +357,7 @@ TOperable_field& TMask::focus_field() const
|
||||
{
|
||||
const short focus = low_get_focus_id(win());
|
||||
if (focus > 0 )
|
||||
((TMask *)this)->_focus = id2pos(focus);
|
||||
((TMask *)this)->notify_focus_field(focus);
|
||||
}
|
||||
|
||||
TMask_field & f = fld(_focus);
|
||||
@ -366,12 +367,10 @@ TOperable_field& TMask::focus_field() const
|
||||
|
||||
void TMask::set_focus_field(short id)
|
||||
{
|
||||
const int pos = id2pos(id);
|
||||
CHECKD(pos >= 0, "Can't set focus to field ", id);
|
||||
_focus = pos;
|
||||
notify_focus_field(id);
|
||||
if (is_open())
|
||||
{
|
||||
const TMask_field& f = fld(pos);
|
||||
const TMask_field& f = field(id);
|
||||
int p = find_parent_page(f);
|
||||
if (p < 0 || p >= _pages || !page_enabled(p))
|
||||
p = 0;
|
||||
@ -382,6 +381,7 @@ void TMask::set_focus_field(short id)
|
||||
void TMask::notify_focus_field(short id)
|
||||
{
|
||||
const int pos = id2pos(id);
|
||||
CHECKD(pos >= 0, "Can't set focus to field ", id);
|
||||
_focus = pos;
|
||||
}
|
||||
|
||||
@ -1915,6 +1915,23 @@ TTree_field& TMask::add_tree (
|
||||
return *f;
|
||||
}
|
||||
|
||||
TGroup_field& TMask::add_groupbox (
|
||||
short id, // @parm Numero identificatore del campo da aggiungere
|
||||
int page, // @parm Pagina nel quale aggiungere il campo
|
||||
const char* prompt, // @parm Prompt del campo
|
||||
int x, // @parm Coordinata x (in caratteri)
|
||||
int y, // @parm Coordinata y (in caratteri)
|
||||
int dx, // @parm Larghezza del campo sulla maschera
|
||||
int dy, // @parm Altezza del campo sulla maschera
|
||||
const char* flags)// @parm Flag di controllo del campo (default "")
|
||||
{
|
||||
TGroup_field* f = new TGroup_field(this);
|
||||
f->construct(id, prompt, x, y, dy, _pagewin[page], flags, dx);
|
||||
add_field(f);
|
||||
return *f;
|
||||
}
|
||||
|
||||
|
||||
// @doc EXTERNAL
|
||||
|
||||
// @mfunc Salva i valori dei campi della maschera sul file di salvataggio
|
||||
@ -2226,4 +2243,4 @@ TYesnoallnone_box::TYesnoallnone_box(const char * message, int default_key)
|
||||
|
||||
|
||||
TYesnoallnone_box::~TYesnoallnone_box()
|
||||
{}
|
||||
{}
|
||||
@ -141,10 +141,11 @@ protected:
|
||||
// @access Public Member
|
||||
public:
|
||||
// @cmember Costruttore (crea la maschera leggendo la descrizione dal file .msk)
|
||||
TMask(const char* title, int num = 0, int max = MAX_PAGES);
|
||||
TMask(const char* filename, int num = 0, int max = MAX_PAGES);
|
||||
// @cmember Costruttore (crea una maschera vuota con i parametri dati)
|
||||
TMask(const char* title, int pages, int cols, int rows, int xpos = -1, int ypos = -1);
|
||||
TMask(const char* title, int pages, int cols, int rows, int xpos = -1, int ypos = -1, WINDOW parent = NULL_WIN);
|
||||
// @cmember Costruttore (crea una maschera vuota per leggerla con read_mask)
|
||||
|
||||
TMask();
|
||||
|
||||
// @cmember Distruttore
|
||||
@ -211,6 +212,8 @@ public:
|
||||
TList_field& add_list (short id, int page, const char* prompt, int x, int y, int dim, const char* flags = "", const char* codes = NULL, const char* items = NULL);
|
||||
// @cmember Aggiunge runtime un campo albero
|
||||
TTree_field& add_tree (short id, int page, int x, int y, int dx, int dy, const char* flags = "");
|
||||
// @cmember Aggiunge runtime un group box alla maschera
|
||||
TGroup_field& add_groupbox (short id, int page, const char* prompt, int x, int y, int dx = 78, int dy = 3, const char* flags = "");
|
||||
|
||||
// @cmember Ritorna il numero di campi della maschera
|
||||
int fields() const
|
||||
@ -472,4 +475,3 @@ public:
|
||||
};
|
||||
|
||||
#endif // __MASK_H
|
||||
|
||||
|
||||
@ -1035,8 +1035,6 @@ protected:
|
||||
// @cmember Ritorna la browse
|
||||
const TBrowse* parse_browse(TScanner& scanner) const;
|
||||
|
||||
// @cmember Ritorna l'identificatore della classe
|
||||
virtual word class_id() const;
|
||||
// @cmember Legge la testata del controllo dal file <p scanner>
|
||||
virtual void parse_head(TScanner& scanner);
|
||||
// @cmember Legge un item del controllo dal file <p scanner>
|
||||
@ -1056,6 +1054,8 @@ protected:
|
||||
|
||||
// @access Public Member
|
||||
public:
|
||||
// @cmember Ritorna l'identificatore della classe
|
||||
virtual word class_id() const;
|
||||
// @cmember Gestisce la chiamata all'handler del campo
|
||||
virtual bool on_hit();
|
||||
// @cmember Scrive sulla relazione il valore del campo
|
||||
|
||||
@ -967,7 +967,10 @@ bool TSpreadsheet::off_cell_handler(XI_OBJ *cell)
|
||||
else
|
||||
_cell_dirty = FALSE;
|
||||
if (_row_dirty)
|
||||
{
|
||||
owner().mask().notify_focus_field(owner().dlg()); // A volte si diverte a perdere il focus
|
||||
mask2str(_cur_rec); // Update sheet row
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
@ -26,6 +26,11 @@
|
||||
|
||||
#define PCN_RICSER "RICSER"
|
||||
#define PCN_IVACOMP "IVACOMP"
|
||||
|
||||
#define PCN_CMSNEEDED "CMSNEEDED"
|
||||
#define PCN_CODCMS "CODCMS"
|
||||
#define PCN_FASCMS "FASCMS"
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@ -1643,16 +1643,17 @@ bool TRelation_application::load_transaction()
|
||||
TConfig cnf(_trans_ini.row(_trans_counter), "Transaction");
|
||||
_curr_transaction = cnf.get("Action");
|
||||
_curr_transaction.upper();
|
||||
_curr_trans_mode = cnf.get("Mode")[0];
|
||||
_curr_trans_mode = toupper(cnf.get("Mode")[0]);
|
||||
_curr_trans_from = cnf.get("From");
|
||||
long firm = cnf.get_long("Firm");
|
||||
if (firm > 0 && firm != get_firm())
|
||||
{
|
||||
bool ok = set_firm(firm);
|
||||
if (ok)
|
||||
if (set_firm(firm))
|
||||
_mask->on_firm_change();
|
||||
else
|
||||
error_box("La ditta %ld non esiste", firm);
|
||||
else
|
||||
error_box("Ditta inesistente: %ld", firm);
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (_curr_transaction == TRANSACTION_RUN)
|
||||
@ -1889,4 +1890,3 @@ bool TRelation_application::mask2mail(const TMask& m)
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -85,8 +85,7 @@ public:
|
||||
|
||||
void update(long n = -1);
|
||||
|
||||
TSheet_control(WINDOW sheet, short cid,
|
||||
short x, short y, short dx, short dy,
|
||||
TSheet_control(WINDOW sheet, short cid, short x, short y, short dx, short dy,
|
||||
const char* flags, const char* head);
|
||||
virtual ~TSheet_control() {}
|
||||
};
|
||||
@ -977,8 +976,8 @@ void TQuery_field::create(WINDOW parent)
|
||||
|
||||
TSheet::TSheet(short x, short y, short dx, short dy,
|
||||
const char* title, const char* head,
|
||||
byte buttons, short sht_y)
|
||||
: TMask(title, sht_y == 0 ? 1 : 2, dx, dy, x, y),
|
||||
byte buttons, short sht_y, WINDOW parent)
|
||||
: TMask(title, sht_y == 0 ? 1 : 2, dx, dy, x, y, parent),
|
||||
_parked(-1), _sheet(NULL), _select_row(-1)
|
||||
{
|
||||
TQuery_field* qf = new TQuery_field(this);
|
||||
@ -1317,9 +1316,9 @@ long TArray_sheet::insert(const TToken_string& s, long n)
|
||||
|
||||
TCursor_sheet::TCursor_sheet(TCursor* cursor, const char* fields,
|
||||
const char* title, const char* head,
|
||||
byte buttons, short sht_y)
|
||||
byte buttons, short sht_y, WINDOW parent)
|
||||
: TSheet(sht_y ? 3 : 0, sht_y ? 3 : 0, sht_y ? -3 : 0, sht_y ? -3 : 0,
|
||||
title, head, buttons, sht_y),
|
||||
title, head, buttons, sht_y, parent),
|
||||
_cursor(cursor), _records(cursor->items())
|
||||
{
|
||||
TToken_string fldlst(fields);
|
||||
|
||||
@ -101,7 +101,7 @@ public:
|
||||
|
||||
// @cmember Costruttore
|
||||
TSheet(short x, short y, short dx, short dy, const char* title,
|
||||
const char* head, byte buttons = 0, short sht_y = 0);
|
||||
const char* head, byte buttons = 0, short sht_y = 0, WINDOW parent = NULL_WIN);
|
||||
|
||||
// @cmember Distruttore
|
||||
virtual ~TSheet();
|
||||
@ -198,7 +198,8 @@ public:
|
||||
const TArray& fields_array() const { return _fields; }
|
||||
|
||||
// @cmember Costruttore
|
||||
TCursor_sheet(TCursor* cursor, const char* fields, const char* title, const char* head, byte buttons = 0, short sht_y = 0);
|
||||
TCursor_sheet(TCursor* cursor, const char* fields, const char* title,
|
||||
const char* head, byte buttons = 0, short sht_y = 0, WINDOW parent = NULL_WIN);
|
||||
// @cmember Distruttore
|
||||
virtual ~TCursor_sheet()
|
||||
{}
|
||||
|
||||
@ -67,7 +67,7 @@ public:
|
||||
// @cmember Ritorna il valore hash della stringa
|
||||
virtual word hash() const;
|
||||
|
||||
// @cmember const char * | operator const char*() | | Trasforna una stringa
|
||||
// @cmember const char * | operator const char*() | | Trasforma una stringa
|
||||
// in puntatore a carattere
|
||||
operator const char*() const
|
||||
{ return (const char*)_str; }
|
||||
|
||||
@ -1345,7 +1345,7 @@ void TTree_window::handler(WINDOW win, EVENT* ep)
|
||||
TTree_window::TTree_window(int x, int y, int dx, int dy,
|
||||
WINDOW parent, TTree_field* owner)
|
||||
: TField_window(x, y, dx, dy, parent, owner), _tree(NULL),
|
||||
_hide_leaves(FALSE)
|
||||
_hide_leaves(FALSE), _headlines(0)
|
||||
{
|
||||
_row_height = CHARY+2;
|
||||
}
|
||||
|
||||
@ -40,6 +40,12 @@ const char* ITEMS_SF[] = {
|
||||
// Items per causale quadro SG
|
||||
const char* ITEMS_SG[] = {
|
||||
"A|A", "B|B", "C|C", "D|D", "E|E", NULL };
|
||||
|
||||
// Items per causale quadro LA
|
||||
const char* ITEMS_LA[] = {
|
||||
"A|A", "B|B", "C|C", "D|D", "E|E", "F|F", "G|G", "H|H", "I|I", "L|L", "M|M",
|
||||
"N|N", "P|P", "Q|Q", "R|R", "S|S", "T|T", "U|U", "V|V", "W|W", "Z|Z", NULL };
|
||||
|
||||
|
||||
HIDDEN TString80 __tmp;
|
||||
|
||||
@ -1990,9 +1996,11 @@ void TSchedaPercipienti::build_causqua_items(TMask& m, const TString& quadro) co
|
||||
if (quadro == "SG")
|
||||
for (int i=0; ITEMS_SG[i]; i++)
|
||||
Items.add(ITEMS_SG[i]);
|
||||
if (quadro == "LA")
|
||||
for (int i=0; ITEMS_LA[i]; i++)
|
||||
Items.add(ITEMS_LA[i]);
|
||||
}
|
||||
|
||||
|
||||
int SchedaPerc (int argc, char* argv[])
|
||||
{
|
||||
TSchedaPercipienti a;
|
||||
|
||||
@ -20,7 +20,7 @@ int main(int argc,char** argv)
|
||||
case 2:
|
||||
// m71300(argc,argv);
|
||||
break;
|
||||
// Quadro L
|
||||
// Quadro ST (ex quadro L)
|
||||
case 3:
|
||||
m71310(argc,argv);
|
||||
break;
|
||||
|
||||
@ -519,30 +519,58 @@ void TQuadroC_E2::pack_sheet(const TMask& m)
|
||||
void TQuadroC_E2::distruzione() const
|
||||
{
|
||||
TWait_cursor hourglass;
|
||||
TRelation rel(_file);
|
||||
TRectype& curr = rel.curr();
|
||||
curr.put("CODDITTA", _codditta);
|
||||
|
||||
int err;
|
||||
TLocalisamfile file(_file);
|
||||
file.put("CODDITTA", _codditta);
|
||||
const char* filter = "";
|
||||
if (curr.exist("GENERATA"))
|
||||
filter = "GENERATA=\"X\"";
|
||||
|
||||
for (err = file.read(_isgteq); err == NOERR; err = file.next())
|
||||
{
|
||||
if (file.get_long("CODDITTA") != _codditta)
|
||||
break;
|
||||
file.remove();
|
||||
}
|
||||
TCursor cur(&rel, filter, 1, &curr, &curr);
|
||||
long items = cur.items();
|
||||
cur.freeze();
|
||||
for (cur = 0L; cur.pos() < items; ++cur)
|
||||
rel.remove();
|
||||
cur.freeze(FALSE);
|
||||
|
||||
if (QuadroE1())
|
||||
{
|
||||
TLocalisamfile prosp(LF_PROSPE1);
|
||||
prosp.put("CODDITTA", _codditta);
|
||||
|
||||
for (err = prosp.read(_isgteq); err == NOERR; err = prosp.next())
|
||||
for (int err = prosp.read(_isgteq); err == NOERR; err = prosp.next())
|
||||
{
|
||||
if (prosp.get_long("CODDITTA") != _codditta)
|
||||
break;
|
||||
prosp.remove();
|
||||
}
|
||||
}
|
||||
|
||||
if (curr.exist("NPROG"))
|
||||
{
|
||||
items = cur.items();
|
||||
cur.freeze();
|
||||
TRectype last(_file);
|
||||
long nextnumber = 1;
|
||||
for (cur = 0L; cur.pos() < items; ++cur)
|
||||
{
|
||||
if (!curr.same_key(last,1,1))
|
||||
{
|
||||
nextnumber = 1;
|
||||
last = curr;
|
||||
}
|
||||
long nprog = curr.get_long("NPROG");
|
||||
if (nprog > nextnumber)
|
||||
{
|
||||
rel.remove();
|
||||
curr.put("NPROG", nextnumber);
|
||||
rel.write();
|
||||
}
|
||||
nextnumber++;
|
||||
}
|
||||
}
|
||||
//bool same_key(const TRectype& rec, int key = 1, int skip_last = 0) const
|
||||
}
|
||||
|
||||
void TQuadroC_E2::genera_aliquota(TRectype& quadro, const char* aliquota,
|
||||
@ -681,10 +709,9 @@ void TQuadroC_E2::genera_e1(TRectype& quadro, const TRectype& riga) const
|
||||
}
|
||||
|
||||
void TQuadroC_E2::genera_righe(TRighe_pagamento& righe) const
|
||||
{
|
||||
{
|
||||
TLocalisamfile file(_file);
|
||||
TRectype& curr = file.curr();
|
||||
|
||||
int nriga = 1;
|
||||
righe.restart();
|
||||
for (THash_object* ho = righe.get_hashobj(); ho; ho = righe.get_hashobj(), nriga++)
|
||||
@ -729,6 +756,11 @@ void TQuadroC_E2::genera_righe(TRighe_pagamento& righe) const
|
||||
}
|
||||
|
||||
int err = file.write();
|
||||
while (err == _isreinsert)
|
||||
{
|
||||
curr.put("NPROG",++nriga);
|
||||
err = file.write();
|
||||
}
|
||||
if (err != NOERR)
|
||||
error_box("Errore %d durante la scrittura della riga %d", err, nriga);
|
||||
}
|
||||
@ -862,7 +894,7 @@ bool TQuadroC_E2::genera_handler(TMask_field& f, KEY key)
|
||||
{
|
||||
if (key == K_SPACE)
|
||||
{
|
||||
if (yesno_box("Il quadro verra' completamente eliminato:\n"
|
||||
if (yesno_box("Il quadro verrà completamente eliminato:\n"
|
||||
"Confermare la generazione dalle schede"))
|
||||
app().generazione();
|
||||
}
|
||||
|
||||
@ -110,12 +110,8 @@ BEGIN
|
||||
ITEM "Addizionale\nregionale sosp.@15"
|
||||
ITEM "Imponibile anni\nprecedenti@15"
|
||||
ITEM "Ritenute operate\nanni precedenti@15"
|
||||
ITEM "Anticip."
|
||||
ITEM "Generata\nda schede@9"
|
||||
// FLAGS "A"
|
||||
// USE LF_QUAD KEY NPROG
|
||||
// INPUT CODDITTA F_CODDITTA
|
||||
// INPUT TIPOA F_TIPOA
|
||||
// INPUT CODANAGR F_CODANAGR
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
@ -243,18 +239,24 @@ END
|
||||
CURRENCY 113 15
|
||||
BEGIN
|
||||
PROMPT 1 11 "Imponibile anni precedenti "
|
||||
FIELD IMPANNIPREC
|
||||
FIELD IMPANNIPRE
|
||||
END
|
||||
|
||||
CURRENCY 114 15
|
||||
BEGIN
|
||||
PROMPT 1 12 "Ritenute anni precedenti "
|
||||
FIELD RITANNIPREC
|
||||
FIELD RITANNIPRE
|
||||
END
|
||||
|
||||
BOOLEAN 115
|
||||
BEGIN
|
||||
PROMPT 1 13 "Riga generata dalle schede"
|
||||
PROMPT 1 13 "Anticipazione"
|
||||
FIELD ANTICIPAZ
|
||||
END
|
||||
|
||||
BOOLEAN 116
|
||||
BEGIN
|
||||
PROMPT 31 13 "Generata da schede"
|
||||
FLAGS "D"
|
||||
FIELD GENERATA
|
||||
END
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// 771310.cpp - Modello 770 - Gestione quadro L
|
||||
// 771310.cpp - Modello 770 - Gestione quadro ST (ex-quadro L)
|
||||
#include <applicat.h>
|
||||
#include <mask.h>
|
||||
#include <msksheet.h>
|
||||
@ -259,10 +259,6 @@ void M71310_application::init_insert_mode(TMask& m)
|
||||
m.set(F_ANNODIC, _anno);
|
||||
m.disable(F_ANNODIC);
|
||||
m.disable(F_GENERA);
|
||||
m.enable (F_QLRITEFF);
|
||||
m.enable (F_QLRITVER);
|
||||
m.enable (F_QLRSS);
|
||||
m.enable (-G_NOTE);
|
||||
}
|
||||
|
||||
void M71310_application::init_query_mode(TMask& m)
|
||||
@ -271,10 +267,6 @@ void M71310_application::init_query_mode(TMask& m)
|
||||
m.set(F_ANNODIC, _anno);
|
||||
m.enable(F_ANNODIC);
|
||||
m.enable (F_GENERA);
|
||||
m.disable(F_QLRITEFF);
|
||||
m.disable(F_QLRITVER);
|
||||
m.disable(F_QLRSS);
|
||||
m.disable (-G_NOTE);
|
||||
}
|
||||
|
||||
void M71310_application::init_modify_mode(TMask& m)
|
||||
@ -285,10 +277,6 @@ void M71310_application::init_modify_mode(TMask& m)
|
||||
set_field_note(m);
|
||||
|
||||
m.disable(F_GENERA);
|
||||
m.enable (F_QLRITEFF);
|
||||
m.enable (F_QLRITVER);
|
||||
m.enable (F_QLRSS);
|
||||
m.enable (-G_NOTE);
|
||||
}
|
||||
|
||||
void M71310_application::set_field_note(TMask& m)
|
||||
@ -320,7 +308,7 @@ void M71310_application::build_note(const TMask& m)
|
||||
// Arrotonda l'importo versato
|
||||
real M71310_application::arrotonda(const TMask& m)
|
||||
{
|
||||
real rImpVers = m.get_real(F_QLRITVER);
|
||||
real rImpVers = m.get_real(F_QLRITVEREC);
|
||||
real rImpArr = round_770(rImpVers);
|
||||
return rImpArr;
|
||||
}
|
||||
@ -328,10 +316,9 @@ real M71310_application::arrotonda(const TMask& m)
|
||||
int M71310_application::rewrite(const TMask& m)
|
||||
{
|
||||
_registra = TRUE;
|
||||
real rImpVersArr;
|
||||
build_note(m);
|
||||
m.autosave(*_rel);
|
||||
rImpVersArr = arrotonda(m);
|
||||
const real rImpVersArr = arrotonda(m);
|
||||
_rel->lfile().put(QUL_QLRITVER, rImpVersArr);
|
||||
return _rel->rewrite();
|
||||
}
|
||||
@ -339,10 +326,9 @@ int M71310_application::rewrite(const TMask& m)
|
||||
int M71310_application::write(const TMask& m)
|
||||
{
|
||||
_registra = TRUE;
|
||||
real rImpVersArr;
|
||||
build_note(m);
|
||||
m.autosave(*_rel);
|
||||
rImpVersArr = arrotonda(m);
|
||||
const real rImpVersArr = arrotonda(m);
|
||||
_rel->lfile().put(QUL_QLRITVER, rImpVersArr);
|
||||
return _rel->write();
|
||||
}
|
||||
|
||||
@ -13,11 +13,19 @@
|
||||
#define F_QLNUMERO 111
|
||||
#define F_QLCODQUA 112
|
||||
#define F_QLRITEFF 113
|
||||
#define F_QLRITVER 114
|
||||
#define F_QLRSS 115
|
||||
#define F_QLNOTE 116
|
||||
#define F_GENERA 117
|
||||
#define F_ANNODIC 118
|
||||
#define F_QLRITVEREC 114
|
||||
#define F_QLRITCOMP 115
|
||||
#define F_QLDIFF 116
|
||||
#define F_QLINTER 117
|
||||
#define F_EVENTI 118
|
||||
#define F_VALDIV 119
|
||||
#define F_REGIONE 120
|
||||
|
||||
#define F_CALCDIFF 122
|
||||
|
||||
#define F_QLNOTE 123
|
||||
#define F_GENERA 124
|
||||
#define F_ANNODIC 125
|
||||
|
||||
#define F_PARAMETRI 126
|
||||
#define F_QUADRO 130
|
||||
|
||||
144
m770/771310a.uml
144
m770/771310a.uml
@ -1,6 +1,6 @@
|
||||
#include "771310.h"
|
||||
|
||||
TOOLBAR "" 0 18 0 4
|
||||
TOOLBAR "" 0 -4 0 4
|
||||
BUTTON F_GENERA 21 2
|
||||
BEGIN
|
||||
PROMPT -13 -3 "~Generazione"
|
||||
@ -16,14 +16,14 @@ ENDPAGE
|
||||
|
||||
PAGE "Riepilogo ST" -1 -1 78 18
|
||||
|
||||
GROUPBOX DLG_NULL 78 4
|
||||
GROUPBOX DLG_NULL 78 3
|
||||
BEGIN
|
||||
PROMPT 1 0 ""
|
||||
END
|
||||
|
||||
NUMBER F_CODDITTA 5
|
||||
BEGIN
|
||||
PROMPT 3 1 "Ditta "
|
||||
PROMPT 2 1 "Ditta "
|
||||
FLAGS "RDG"
|
||||
USE LF_NDITTE
|
||||
FIELD LF_QUAL->CODDITTA
|
||||
@ -37,30 +37,31 @@ END
|
||||
|
||||
STRING F_RAGSOC 50
|
||||
BEGIN
|
||||
PROMPT 17 1 "Ragione "
|
||||
PROMPT 16 1 ""
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
NUMBER F_ANNODIC 4
|
||||
BEGIN
|
||||
PROMPT 52 2 "Anno dichiarazione "
|
||||
PROMPT 68 1 "Anno "
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 78 7
|
||||
BEGIN
|
||||
PROMPT 1 3 ""
|
||||
PROMPT 1 2 ""
|
||||
END
|
||||
|
||||
NUMBER F_QLANNOPAG 4
|
||||
BEGIN
|
||||
PROMPT 2 4 "Anno pagamento "
|
||||
USE LF_QUAL SELECT ((CODDITTA=#F_CODDITTA)&&(QLAP=#F_ANNODIC))
|
||||
INPUT CODDITTA F_CODDITTA
|
||||
PROMPT 2 3 "Anno pagamento "
|
||||
USE LF_QUAL
|
||||
INPUT CODDITTA F_CODDITTA SELECT
|
||||
INPUT QLAP F_QLANNOPAG
|
||||
INPUT QLMP F_QLMESEPAG
|
||||
DISPLAY "A.P." QLAP
|
||||
DISPLAY "M.P." QLMP
|
||||
DISPLAY "Ritenute@15R" QLRITEFF
|
||||
DISPLAY "Importo versato@R" QLRITVER
|
||||
DISPLAY "Ritenute@15V" QLRITEFF
|
||||
DISPLAY "Importo versato@V" QLRITVEREC
|
||||
DISPLAY "L.V." QLLV
|
||||
DISPLAY "T.V." QLTV
|
||||
DISPLAY "C.T." QLCT
|
||||
@ -68,11 +69,11 @@ BEGIN
|
||||
DISPLAY "Data Vers." QLDV
|
||||
DISPLAY "Serie/ABI" QLSERIE
|
||||
DISPLAY "Numero/CAB@11" QLNUMERO
|
||||
DISPLAY "Rss" QLRSS
|
||||
DISPLAY "Note@20" QLNOTE
|
||||
OUTPUT F_QLDATAVERS QLDV
|
||||
OUTPUT F_QLMESEPAG QLMP
|
||||
OUTPUT F_CODDITTA CODDITTA
|
||||
OUTPUT F_QLANNOPAG QLAP
|
||||
OUTPUT F_QLMESEPAG QLMP
|
||||
OUTPUT F_QLDATAVERS QLDV
|
||||
OUTPUT F_QLLUOVERS QLLV
|
||||
OUTPUT F_QLTIPOVERS QLTV
|
||||
OUTPUT F_QLCODTRIB QLCT
|
||||
@ -86,12 +87,13 @@ BEGIN
|
||||
FIELD LF_QUAL->QLAP
|
||||
VALIDATE FIXLEN_FUNC 4
|
||||
WARNING "L'anno deve essere indicato per esteso"
|
||||
KEY 1
|
||||
KEY 1
|
||||
CHECKTYPE SEARCH
|
||||
END
|
||||
|
||||
LIST F_QLMESEPAG 2 13
|
||||
BEGIN
|
||||
PROMPT 45 4 "Mese pagamento "
|
||||
PROMPT 45 3 "Mese pagamento "
|
||||
FIELD LF_QUAL->QLMP
|
||||
ITEM " |Indefinito"
|
||||
FLAGS "M"
|
||||
@ -100,14 +102,14 @@ END
|
||||
|
||||
DATE F_QLDATAVERS
|
||||
BEGIN
|
||||
PROMPT 2 5 "Data versamento "
|
||||
PROMPT 2 4 "Data versamento "
|
||||
FIELD LF_QUAL->QLDV
|
||||
KEY 1
|
||||
END
|
||||
|
||||
LIST F_QLLUOVERS 11
|
||||
BEGIN
|
||||
PROMPT 45 5 "Luogo versamento "
|
||||
PROMPT 45 4 "Luogo versamento "
|
||||
ITEM " |Nessuno"
|
||||
ITEM "C|F24"
|
||||
ITEM "T|Tesoreria"
|
||||
@ -117,7 +119,7 @@ END
|
||||
|
||||
LIST F_QLTIPOVERS 15
|
||||
BEGIN
|
||||
PROMPT 2 6 "Tipo versamento "
|
||||
PROMPT 2 5 "Tipo versamento "
|
||||
ITEM " |Nessuno"
|
||||
MESSAGE HIDE,G_ABICAB@|HIDE,G_DISTINTA@|HIDE,G_CC@
|
||||
ITEM "B|Delega bancaria"
|
||||
@ -132,7 +134,7 @@ END
|
||||
|
||||
NUMBER F_QLCODTRIB 4
|
||||
BEGIN
|
||||
PROMPT 45 6 "Codice tributo "
|
||||
PROMPT 45 5 "Codice tributo "
|
||||
FIELD LF_QUAL->QLCT
|
||||
KEY 1
|
||||
CHECKTYPE REQUIRED
|
||||
@ -140,44 +142,44 @@ END
|
||||
|
||||
NUMBER F_ARTBIL 2
|
||||
BEGIN
|
||||
PROMPT 2 7 "Articolo di bilancio "
|
||||
PROMPT 2 6 "Articolo di bilancio "
|
||||
FIELD LF_QUAL->QLAB
|
||||
KEY 1
|
||||
END
|
||||
|
||||
TEXT DLG_NULL
|
||||
BEGIN
|
||||
PROMPT 2 8 "Serie "
|
||||
PROMPT 2 7 "Serie "
|
||||
GROUP G_DISTINTA G_DISTINTA_TESORERIA
|
||||
END
|
||||
|
||||
TEXT DLG_NULL
|
||||
BEGIN
|
||||
PROMPT 45 8 "Numero "
|
||||
PROMPT 45 7 "Numero "
|
||||
GROUP G_DISTINTA
|
||||
END
|
||||
|
||||
TEXT DLG_NULL
|
||||
BEGIN
|
||||
PROMPT 45 8 "Quietanza "
|
||||
PROMPT 45 7 "Quietanza "
|
||||
GROUP G_CC
|
||||
END
|
||||
|
||||
TEXT DLG_NULL
|
||||
BEGIN
|
||||
PROMPT 2 8 "Codice ABI "
|
||||
PROMPT 2 7 "Codice ABI "
|
||||
GROUP G_ABICAB
|
||||
END
|
||||
|
||||
TEXT DLG_NULL
|
||||
BEGIN
|
||||
PROMPT 45 8 "Codice CAB "
|
||||
PROMPT 45 7 "Codice CAB "
|
||||
GROUP G_ABICAB
|
||||
END
|
||||
|
||||
STRING F_QLSERIE 5
|
||||
BEGIN
|
||||
PROMPT 23 8 ""
|
||||
PROMPT 23 7 ""
|
||||
FIELD LF_QUAL->QLSERIE
|
||||
GROUP G_DISTINTA G_DISTINTA_TESORERIA
|
||||
KEY 1
|
||||
@ -185,7 +187,7 @@ END
|
||||
|
||||
STRING F_QLNUMERO 11
|
||||
BEGIN
|
||||
PROMPT 62 8 ""
|
||||
PROMPT 62 7 ""
|
||||
FIELD LF_QUAL->QLNUMERO
|
||||
GROUP G_DISTINTA
|
||||
KEY 1
|
||||
@ -193,7 +195,7 @@ END
|
||||
|
||||
STRING F_CCQUIETANZA 11
|
||||
BEGIN
|
||||
PROMPT 62 8 ""
|
||||
PROMPT 62 7 ""
|
||||
FIELD LF_QUAL->QLNUMERO
|
||||
GROUP G_CC
|
||||
KEY 1
|
||||
@ -201,7 +203,7 @@ END
|
||||
|
||||
NUMBER F_ABI 5
|
||||
BEGIN
|
||||
PROMPT 23 8 ""
|
||||
PROMPT 23 7 ""
|
||||
FIELD LF_QUAL->QLSERIE
|
||||
FLAGS "Z"
|
||||
GROUP G_ABICAB
|
||||
@ -210,7 +212,7 @@ END
|
||||
|
||||
NUMBER F_CAB 5
|
||||
BEGIN
|
||||
PROMPT 62 8 ""
|
||||
PROMPT 62 7 ""
|
||||
FIELD LF_QUAL->QLNUMERO[1,5]
|
||||
FLAGS "Z"
|
||||
GROUP G_ABICAB
|
||||
@ -219,7 +221,7 @@ END
|
||||
|
||||
NUMBER F_NPROG 6
|
||||
BEGIN
|
||||
PROMPT 68 8 ""
|
||||
PROMPT 68 7 ""
|
||||
FIELD LF_QUAL->QLNUMERO[6,11]
|
||||
FLAGS "Z"
|
||||
GROUP G_ABICAB
|
||||
@ -228,57 +230,79 @@ END
|
||||
|
||||
LIST F_QUADRO 2
|
||||
BEGIN
|
||||
PROMPT 0 10 "Codice quadro "
|
||||
PROMPT 2 9 "Codice quadro "
|
||||
HELP "Inserire il codice quadro"
|
||||
ITEM "| "
|
||||
ITEM "SC|SC"
|
||||
ITEM "SE|SE"
|
||||
ITEM "LA|LA"
|
||||
ITEM "SF|SF"
|
||||
ITEM "SG|SG"
|
||||
ITEM "ST|ST"
|
||||
FIELD LF_QUAL->QLCODQUA
|
||||
END
|
||||
|
||||
TEXT DLG_NULL
|
||||
BEGIN
|
||||
PROMPT 0 11 "Somme assoggettate a ritenuta:"
|
||||
END
|
||||
|
||||
TEXT DLG_NULL
|
||||
BEGIN
|
||||
PROMPT 0 12 "Rit. Effettuate"
|
||||
END
|
||||
|
||||
CURRENCY F_QLRITEFF 15
|
||||
BEGIN
|
||||
PROMPT 0 13 ""
|
||||
PROMPT 2 10 "Ritenute Operate "
|
||||
FIELD LF_QUAL->QLRITEFF
|
||||
END
|
||||
|
||||
TEXT DLG_NULL
|
||||
CURRENCY F_QLRITVEREC 15
|
||||
BEGIN
|
||||
PROMPT 17 12 "Importo versato"
|
||||
PROMPT 42 10 "Rit. Vers. Ecc. "
|
||||
FIELD LF_QUAL->QLRITVEREC
|
||||
END
|
||||
|
||||
CURRENCY F_QLRITVER 15
|
||||
CURRENCY F_QLRITCOMP 15
|
||||
BEGIN
|
||||
PROMPT 17 13 ""
|
||||
FIELD LF_QUAL->QLRITVER
|
||||
PROMPT 2 11 "Rit. Compensate "
|
||||
FIELD LF_QUAL->QLRITCOMP
|
||||
END
|
||||
|
||||
TEXT DLG_NULL
|
||||
NUMBER F_CALCDIFF 15
|
||||
BEGIN
|
||||
PROMPT 37 12 "RSS"
|
||||
PROMPT 42 11 "Calcolo differenza"
|
||||
FLAGS "H"
|
||||
DRIVENBY F_QLRITEFF F_QLRITVEREC F_QLRITCOMP
|
||||
NUM_CALC #F_QLRITEFF-#F_QLRITVEREC-#F_QLRITCOMP
|
||||
MESSAGE COPY,F_QLDIFF
|
||||
END
|
||||
|
||||
LIST F_QLRSS 7
|
||||
CURRENCY F_QLDIFF 15
|
||||
BEGIN
|
||||
PROMPT 42 11 "Differenza "
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
CURRENCY F_QLINTER 15
|
||||
BEGIN
|
||||
PROMPT 2 12 "Interessi "
|
||||
FIELD LF_QUAL->QLINTERESS
|
||||
END
|
||||
|
||||
STRING F_EVENTI 1
|
||||
BEGIN
|
||||
PROMPT 34 13 ""
|
||||
ITEM " |Nessuna"
|
||||
ITEM "1|VA"
|
||||
ITEM "2|SA"
|
||||
ITEM "3|SI"
|
||||
FIELD LF_QUAL->QLRSS
|
||||
PROMPT 42 12 "Eventi eccezionali "
|
||||
FLAGS "U"
|
||||
FIELD LF_QUAL->QLEVENTI
|
||||
END
|
||||
|
||||
BOOLEAN F_VALDIV
|
||||
BEGIN
|
||||
PROMPT 2 13 "Versamento in diversa valuta"
|
||||
FIELD LF_QUAL->QLVALDIV
|
||||
END
|
||||
|
||||
NUMBER F_REGIONE 2
|
||||
BEGIN
|
||||
PROMPT 42 13 "Regione "
|
||||
FLAGS "Z"
|
||||
USE %RGI
|
||||
INPUT CODTAB F_REGIONE
|
||||
DISPLAY "Codice" CODTAB
|
||||
DISPLAY "Denominazione@50" S0
|
||||
OUTPUT F_REGIONE CODTAB
|
||||
CHECKTYPE NORMAL
|
||||
FIELD LF_QUAL->QLREGIONE
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 78 4
|
||||
|
||||
@ -39,19 +39,15 @@ HIDDEN inline Tab770_application& app() {return (Tab770_application&) main_app()
|
||||
|
||||
HIDDEN bool codqua_handler(TMask_field& f, KEY k)
|
||||
{
|
||||
if (k == K_ENTER && f.mask().is_running())
|
||||
if (f.to_check(k))
|
||||
{
|
||||
TMask& m = f.mask();
|
||||
const int trib = atoi(m.get(F_CODTRIB));
|
||||
|
||||
const int trib = m.get_int(F_CODTRIB);
|
||||
if (trib == 1015)
|
||||
{
|
||||
const int dlg_qua = F_QUADRCE2;
|
||||
TString16 quad(m.get(F_QUADRCE2));
|
||||
quad.trim();
|
||||
quad.upper();
|
||||
if (quad != "SC" && quad != "SE" && quad != "SF" && quad != "SG")
|
||||
return f.error_box("Con il codice tributo 1015 si possono indicare solo i quadri SC-SE-SF-SG");
|
||||
const TString& quad = m.get(F_QUADRCE2);
|
||||
if (quad != "LA" && quad != "SF" && quad != "SG")
|
||||
return f.error_box("Con il codice tributo 1015 si possono indicare solo i quadri LA-SF-SG");
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
|
||||
@ -102,7 +102,7 @@ bool TGenera::set(const long codditta, TConfig* cnf, const char* section)
|
||||
this_genera = this;
|
||||
|
||||
// controllo presenza causale 1015
|
||||
const int causale = atoi(cnf->get("CoCa1015", section));
|
||||
const int causale = cnf->get_int("CoCa1015", section);
|
||||
if (causale)
|
||||
{
|
||||
if (!causale1015(causale))
|
||||
@ -112,8 +112,8 @@ bool TGenera::set(const long codditta, TConfig* cnf, const char* section)
|
||||
return warning_box("Manca la causale 1015 nei parametri di studio");
|
||||
|
||||
// conferma di generazione
|
||||
TString scritta(60);
|
||||
scritta.format("Conferma generazione dei versamenti\n per la ditta %ld ?", codditta);
|
||||
TString scritta;
|
||||
scritta.format("Confermare generazione dei versamenti\nper la ditta %ld?", codditta);
|
||||
if (!yesno_box(scritta))
|
||||
return TRUE;
|
||||
|
||||
@ -177,46 +177,36 @@ int TGenera::controllo_parametri()
|
||||
|
||||
bool TGenera::azzera_quadroL()
|
||||
{
|
||||
TString16 filt;
|
||||
TRelation rl(LF_QUAL);
|
||||
TRectype& curr = rl.curr();
|
||||
curr.put("CODDITTA", _codditta);
|
||||
|
||||
TRelation* rl;
|
||||
TCursor* cl;
|
||||
TCursor cl(&rl,"",1, &curr, &curr);
|
||||
|
||||
filt.format("CODDITTA=%ld", _codditta);
|
||||
|
||||
rl = new TRelation(LF_QUAL);
|
||||
cl = new TCursor(rl,filt,1);
|
||||
TRecnotype cl_items = cl->items();
|
||||
cl->freeze();
|
||||
const TRecnotype cl_items = cl.items();
|
||||
cl.freeze();
|
||||
|
||||
(*cl) = 0L;
|
||||
TString scritta;
|
||||
scritta.format("Azzeramento quadro ST per la ditta %ld", _codditta);
|
||||
TProgind progn(cl_items, scritta, FALSE, TRUE);
|
||||
|
||||
TString scritta(60);
|
||||
scritta.format("Azzeramento quadro L per la ditta %ld", _codditta);
|
||||
TProgind progn(cl_items, scritta, FALSE, TRUE);
|
||||
TLocalisamfile& fl = cl->file();
|
||||
|
||||
for (int i = 0; i < cl_items; i++, ++(*cl))
|
||||
for (cl=0; cl.pos() < cl_items; ++cl)
|
||||
{
|
||||
progn.addstatus(1);
|
||||
TString quadro(2);
|
||||
|
||||
// solo quelli dell'anno dichiarazione
|
||||
if (fl.get_int(QUL_QLAP) != _annodic)
|
||||
if (curr.get_int(QUL_QLAP) != _annodic)
|
||||
continue;
|
||||
|
||||
// solo quelli di quadri SC/SE/SF/SG
|
||||
quadro = fl.get(QUL_QLCODQUA);
|
||||
if (quadro != "SC" && quadro != "SE" && quadro != "SF" && quadro != "SG")
|
||||
const TString& quadro = curr.get(QUL_QLCODQUA);
|
||||
if (quadro != "LA" && quadro != "SF" && quadro != "SG")
|
||||
continue;
|
||||
|
||||
// rimozione record
|
||||
fl.remove();
|
||||
rl.remove();
|
||||
}
|
||||
|
||||
delete cl; // Cazzone: te li eri dimenticati
|
||||
delete rl;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -391,7 +381,7 @@ bool TGenera::genera_riga(TCursor* cur)
|
||||
// Se e' tributo1015 posso evitare di controllare il codice quadro
|
||||
if (!_ver1015)
|
||||
{
|
||||
if (_codqua != "SC" && _codqua != "SE" && _codqua != "SF" && _codqua != "SG")
|
||||
if (_codqua != "LA" && _codqua != "SF" && _codqua != "SG")
|
||||
continue;
|
||||
}
|
||||
else
|
||||
|
||||
@ -177,5 +177,6 @@
|
||||
#define DLG_CANCEL_MENUSTQ 301
|
||||
#define T_L 302
|
||||
#define B_L 303
|
||||
#define DLG_STOPREC_MIN 304
|
||||
|
||||
#endif
|
||||
|
||||
@ -123,7 +123,7 @@ END
|
||||
|
||||
TEXT DLG_NULL
|
||||
BEGIN
|
||||
PROMPT 43 5 "Invio"
|
||||
PROMPT 43 5 "Invio Dylog"
|
||||
GROUP MENU_MAIN MENU_MAIN_VIS
|
||||
END
|
||||
|
||||
@ -131,11 +131,25 @@ BUTTON DLG_STOPREC_IR 1 1
|
||||
BEGIN
|
||||
PROMPT 39 5 ""
|
||||
PICTURE 123
|
||||
// FLAGS "D"
|
||||
MESSAGE RUN,777,-1
|
||||
GROUP MENU_MAIN MENU_MAIN_VIS
|
||||
END
|
||||
|
||||
TEXT DLG_NULL
|
||||
BEGIN
|
||||
PROMPT 43 6 "Invio Ministeriale"
|
||||
GROUP MENU_MAIN MENU_MAIN_VIS
|
||||
END
|
||||
|
||||
BUTTON DLG_STOPREC_MIN 1 1
|
||||
BEGIN
|
||||
PROMPT 39 6 ""
|
||||
PICTURE 123
|
||||
MESSAGE RUN,777,-0
|
||||
GROUP MENU_MAIN MENU_MAIN_VIS
|
||||
END
|
||||
|
||||
|
||||
BUTTON DLG_STOPREC_DG 1 1
|
||||
BEGIN
|
||||
PROMPT 39 8 ""
|
||||
@ -154,13 +168,13 @@ END
|
||||
|
||||
TEXT DLG_NULL_ST
|
||||
BEGIN
|
||||
PROMPT 43 6 "Stampe"
|
||||
PROMPT 5 7 "Stampe"
|
||||
GROUP MENU_MAIN MENU_MAIN_VIS
|
||||
END
|
||||
|
||||
BUTTON DLG_STOPREC_ST 1 1
|
||||
BEGIN
|
||||
PROMPT 39 6 ""
|
||||
PROMPT 1 7 ""
|
||||
PICTURE 123
|
||||
GROUP MENU_MAIN MENU_MAIN_VIS
|
||||
END
|
||||
|
||||
830
m770/777100.cpp
830
m770/777100.cpp
File diff suppressed because it is too large
Load Diff
@ -23,6 +23,17 @@
|
||||
// Dichiarazioni
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
HIDDEN int anno_dic()
|
||||
{
|
||||
static int anno = 0;
|
||||
if (anno == 0)
|
||||
{
|
||||
TConfig ini(CONFIG_STUDIO, "77");
|
||||
anno = ini.get_int("AnnoDic");
|
||||
}
|
||||
return anno;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// TFormDylog
|
||||
///////////////////////////////////////////////////////////
|
||||
@ -324,8 +335,7 @@ long TFormDylog::trasfer(long codditta, TTrasferimentoDylog& file, const char* t
|
||||
const char* td = NULL;
|
||||
switch (tipo[1])
|
||||
{
|
||||
case 'C': td = "C0"; break;
|
||||
case 'E': td = "E0"; break;
|
||||
case 'A': td = "AU"; break;
|
||||
case 'T': td = "T0"; break;
|
||||
default : break;
|
||||
}
|
||||
@ -343,16 +353,12 @@ long TFormDylog::trasfer(long codditta, TTrasferimentoDylog& file, const char* t
|
||||
TRecordDylog rec(td, cfdich);
|
||||
transfer_section(body, rec, file);
|
||||
|
||||
// Il quadro T0 contiene un array di 8 sotto-record da azzerare per la Dylog!
|
||||
// Il quadro ST contiene un array di 3 sotto-record da azzerare per la Dylog!
|
||||
if (stricmp(td, "T0") == 0)
|
||||
{
|
||||
cur.curr().zero();
|
||||
for (int i = 1; i < 3; i++)
|
||||
transfer_section(body, rec, file, i*99);
|
||||
|
||||
TPrint_section& body2 = section('B', even_page);
|
||||
for (i = 0; i < 5; i++)
|
||||
transfer_section(body2, rec, file, 297+i*108);
|
||||
transfer_section(body, rec, file, i*91);
|
||||
}
|
||||
|
||||
file << rec;
|
||||
@ -371,9 +377,8 @@ TFormDylog::TFormDylog(const char* name)
|
||||
|
||||
switch (TForm::cursor()->file().num())
|
||||
{
|
||||
case LF_QUAC: key = "CODDITTA|TIPOA|216@->RAGSOC|CODANAGR|CODCAUS|PERC"; break; // Obsoleto
|
||||
case LF_QUAD: key = "CODDITTA|216@->RAGSOC|TIPOA|CODANAGR"; break;
|
||||
default : break;
|
||||
case LF_QUALA: key = "CODDITTA|216@->RAGSOC|TIPOA|CODANAGR"; break;
|
||||
default : break;
|
||||
}
|
||||
if (key)
|
||||
_sortedcur = new TSorted_cursor(TForm::relation(), key);
|
||||
@ -391,14 +396,12 @@ TFormDylog::~TFormDylog()
|
||||
|
||||
TFormDylog& TTracciatiDylog::form(const char* quadro)
|
||||
{
|
||||
CHECK(quadro && *quadro == 'S' && quadro[1] != '\0',
|
||||
"Codice quadro non valido");
|
||||
CHECK(quadro && *quadro != '\0' && quadro[1] != '\0', "Codice quadro non valido");
|
||||
|
||||
const char* name;
|
||||
switch(quadro[1])
|
||||
{
|
||||
case 'C': name = "77qsc"; break;
|
||||
case 'E': name = "77qse"; break;
|
||||
case 'A': name = "77qla"; break;
|
||||
case 'T': name = "77qst"; break;
|
||||
default : name = NULL; break;
|
||||
}
|
||||
@ -542,8 +545,8 @@ const TString& TTrasferimentoDylog::default_name()
|
||||
{
|
||||
if (_defname.empty())
|
||||
{
|
||||
const TDate today(TODAY);
|
||||
_defname.format("TRA7%02d", today.year() % 100);
|
||||
const int anno = anno_dic()+1;
|
||||
_defname.format("TRA7%02d", anno % 100);
|
||||
}
|
||||
return _defname;
|
||||
}
|
||||
@ -722,12 +725,6 @@ TTrasferimentoDylog::~TTrasferimentoDylog()
|
||||
// main
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
HIDDEN int anno_dic()
|
||||
{
|
||||
TConfig ini(CONFIG_STUDIO);
|
||||
return ini.get_int("AnnoDic");
|
||||
}
|
||||
|
||||
class TTransferDylog_msk : public TAutomask
|
||||
{
|
||||
protected:
|
||||
@ -793,8 +790,7 @@ void TTransferDylog_app::main_loop()
|
||||
const long codditta = base.get_long(BSE_CODDITTA);
|
||||
if (codditta > 0) // Strano, ma puo' succedere
|
||||
{
|
||||
t.append_quadro("SC", codditta, pi);
|
||||
t.append_quadro("SE", codditta, pi);
|
||||
t.append_quadro("LA", codditta, pi);
|
||||
t.append_quadro("ST", codditta, pi);
|
||||
}
|
||||
}
|
||||
|
||||
321
m770/77qla.frm
Executable file
321
m770/77qla.frm
Executable file
@ -0,0 +1,321 @@
|
||||
USE 144
|
||||
JOIN 9 INTO CODDITTA=CODDITTA
|
||||
JOIN 6 TO 9 ALIAS 206 INTO TIPOA=TIPOA CODANAGR=CODANAGR
|
||||
JOIN 6 ALIAS 216 INTO TIPOA=TIPOA CODANAGR=CODANAGR
|
||||
JOIN 8 TO 216@ ALIAS 218 INTO CODANAGR=CODANAGR
|
||||
JOIN 13 TO 218@ ALIAS 313 INTO STATO=="" COM==COMNASC
|
||||
JOIN 13 TO 216@ ALIAS 413 INTO STATO==STATORES COM==COMRES
|
||||
JOIN 13 TO 216@ ALIAS 513 INTO STATO=="" COM==COMRF
|
||||
JOIN %STA TO 216@ ALIAS 104 INTO CODTAB=STATORES
|
||||
END
|
||||
|
||||
DESCRIPTION
|
||||
BEGIN
|
||||
62->* "Quadro LA 770"
|
||||
9->* "Ditte"
|
||||
6->* "Anagrafica persone fisiche e giuridiche"
|
||||
8->* "Anagrafica persone fisiche"
|
||||
206@->* "Anagrafica persone fisiche e giuridiche"
|
||||
216@->* "Anagrafica persone fisiche e giuridiche"
|
||||
218@->* "Anagrafica persone fisiche"
|
||||
313@->* "Comune nascita"
|
||||
413@->* "Comune residenza"
|
||||
513@->* "Comune residenza fiscale"
|
||||
END
|
||||
|
||||
GENERAL
|
||||
BEGIN
|
||||
OFFSET 0 0
|
||||
FONT "Roman 17cpi"
|
||||
SIZE 12
|
||||
CA "X"
|
||||
IN 3 3
|
||||
FI 130
|
||||
END
|
||||
|
||||
SECTION BODY ODD 10
|
||||
|
||||
STRINGA 1
|
||||
BEGIN
|
||||
KEY "COD.FIS"
|
||||
PROMPT 10 1 ""
|
||||
FIELD 216@->COFI
|
||||
SPECIAL STRING TRASFER "AU001001" ""
|
||||
SPECIAL STRING DYLOG "AN,0,16" ""
|
||||
END
|
||||
|
||||
STRINGA 2
|
||||
BEGIN
|
||||
KEY "COGNOME"
|
||||
PROMPT 42 1 ""
|
||||
FIELD 216@->RAGSOC[1,30]
|
||||
SPECIAL STRING TRASFER "AU001002" ""
|
||||
SPECIAL STRING DYLOG "AN,16,24" ""
|
||||
END
|
||||
|
||||
STRINGA 3
|
||||
BEGIN
|
||||
KEY "NOME"
|
||||
PROMPT 22 3 ""
|
||||
FIELD 216@->RAGSOC[31,50]
|
||||
SPECIAL STRING TRASFER "AU001003" ""
|
||||
SPECIAL STRING DYLOG "AN,40,20" ""
|
||||
END
|
||||
|
||||
STRINGA 4
|
||||
BEGIN
|
||||
KEY "SESSO"
|
||||
PROMPT 57 3 ""
|
||||
FIELD 218@->SESSO
|
||||
SPECIAL STRING TRASFER "AU001004" ""
|
||||
SPECIAL STRING DYLOG "AN,60,1" ""
|
||||
END
|
||||
|
||||
STRINGA 5
|
||||
BEGIN
|
||||
KEY "DATA NASCITA"
|
||||
PROMPT 63 3 ""
|
||||
FIELD 218@->DATANASC
|
||||
PICTURE "##^ ##^ ####"
|
||||
SPECIAL STRING TRASFER "AU001005" ""
|
||||
SPECIAL STRING DYLOG "NU,61,8" ""
|
||||
END
|
||||
|
||||
STRINGA 6
|
||||
BEGIN
|
||||
KEY "COMUNE DI NASCITA"
|
||||
PROMPT 79 3 ""
|
||||
FIELD 313@->DENCOM
|
||||
SPECIAL STRING TRASFER "AU001006" ""
|
||||
SPECIAL STRING DYLOG "AN,69,25" ""
|
||||
END
|
||||
|
||||
STRINGA 7
|
||||
BEGIN
|
||||
KEY "PROV DI NASCITA"
|
||||
PROMPT 126 3 ""
|
||||
FIELD 313@->PROVCOM
|
||||
SPECIAL STRING TRASFER "AU001007" ""
|
||||
SPECIAL STRING DYLOG "AN,94,2" ""
|
||||
END
|
||||
|
||||
STRINGA 8
|
||||
BEGIN
|
||||
KEY "COMUNE DI RESIDENZA FISCALE"
|
||||
PROMPT 25 5 ""
|
||||
FIELD 513@->DENCOM
|
||||
FIELD 413@->DENCOM
|
||||
SPECIAL STRING TRASFER "AU001008" ""
|
||||
SPECIAL STRING DYLOG "AN,96,25" ""
|
||||
GROUP 1
|
||||
END
|
||||
|
||||
STRINGA 9
|
||||
BEGIN
|
||||
KEY "PROV DI RESIDENZA FISCALE"
|
||||
PROMPT 126 3 ""
|
||||
FIELD 513@->PROVCOM
|
||||
FIELD 413@->PROVCOM
|
||||
GROUP 1
|
||||
SPECIAL STRING TRASFER "AU001009" ""
|
||||
SPECIAL STRING DYLOG "AN,121,2" ""
|
||||
END
|
||||
|
||||
NUMBER 10
|
||||
BEGIN
|
||||
KEY "CODICE REGIONE"
|
||||
PROMPT 78 5 ""
|
||||
FIELD 218@->CODREG96
|
||||
SPECIAL STRING TRASFER "AU001010" ""
|
||||
SPECIAL STRING DYLOG "NU,123,2" ""
|
||||
GROUP 1
|
||||
END
|
||||
|
||||
STRINGA 101
|
||||
BEGIN
|
||||
KEY "VIA RES. FISC."
|
||||
FIELD 216@->INDRF[1,35]
|
||||
FIELD 216@->INDRES[1,35]
|
||||
FLAGS "H"
|
||||
MESSAGE COPY,11
|
||||
END
|
||||
|
||||
STRINGA 102
|
||||
BEGIN
|
||||
KEY "NUM.CIV DI RESIDENZA FISC."
|
||||
FLAGS "H"
|
||||
FIELD 216@->CIVRF
|
||||
FIELD 216@->CIVRES
|
||||
MESSAGE APPEND,11
|
||||
END
|
||||
|
||||
STRINGA 11
|
||||
BEGIN
|
||||
KEY "VIA RF + NUMCIVRF"
|
||||
PROMPT 78 5 ""
|
||||
SPECIAL STRING TRASFER "AU001011" ""
|
||||
SPECIAL STRING DYLOG "AN,125,25" ""
|
||||
MESSAGE COPY,14
|
||||
END
|
||||
|
||||
STRINGA 12
|
||||
BEGIN
|
||||
KEY "CODICE FISCALE ESTERO"
|
||||
PROMPT 90 7 ""
|
||||
FIELD 216@->COFIEST
|
||||
SPECIAL STRING TRASFER "AU001012" ""
|
||||
SPECIAL STRING DYLOG "AN,150,20" ""
|
||||
END
|
||||
|
||||
STRINGA 13
|
||||
BEGIN
|
||||
KEY "COMUNE ESTERO DI RES."
|
||||
PROMPT 75 7 ""
|
||||
FIELD 513@->DENCOM
|
||||
FIELD 413@->DENCOM
|
||||
SPECIAL STRING TRASFER "AU001013" ""
|
||||
SPECIAL STRING DYLOG "AN,170,25" ""
|
||||
END
|
||||
|
||||
STRINGA 14
|
||||
BEGIN
|
||||
KEY "INDIRIZZO DI RES. ESTERO"
|
||||
PROMPT 75 7 ""
|
||||
// FIELD Copiato da 11
|
||||
SPECIAL STRING TRASFER "AU001014" ""
|
||||
SPECIAL STRING DYLOG "AN,195,25" ""
|
||||
END
|
||||
|
||||
STRINGA 15
|
||||
BEGIN
|
||||
KEY "STATO ESTERO"
|
||||
PROMPT 75 7 ""
|
||||
FIELD 216@->STATORES
|
||||
SPECIAL STRING TRASFER "AU001015" ""
|
||||
SPECIAL STRING DYLOG "NU,220,3" ""
|
||||
END
|
||||
|
||||
STRINGA 16
|
||||
BEGIN
|
||||
KEY "CAUSALE"
|
||||
PROMPT 13 9 ""
|
||||
FIELD CAUSALE
|
||||
SPECIAL STRING TRASFER "AU001016" ""
|
||||
SPECIAL STRING DYLOG "AN,223,1" ""
|
||||
END
|
||||
|
||||
NUMERO 17
|
||||
BEGIN
|
||||
KEY "ANNO"
|
||||
PROMPT 16 9 ""
|
||||
FIELD ANNO
|
||||
SPECIAL STRING TRASFER "AU001017" ""
|
||||
SPECIAL STRING DYLOG "NU,224,4" ""
|
||||
END
|
||||
|
||||
STRINGA 18
|
||||
BEGIN
|
||||
KEY "ANTICIPAZIONI"
|
||||
PROMPT 27 9 ""
|
||||
FIELD ANTICIPAZ
|
||||
SPECIAL STRING TRASFER "AU001018" ""
|
||||
SPECIAL STRING DYLOG "AN,228,1" ""
|
||||
END
|
||||
|
||||
NUMERO 19
|
||||
BEGIN
|
||||
KEY "AMMONTARE LORDO"
|
||||
PROMPT 27 9 ""
|
||||
FIELD TOTALE
|
||||
PICTURE "###.###.###^^^"
|
||||
SPECIAL STRING TRASFER "AU001019" ""
|
||||
SPECIAL STRING DYLOG "NU,229,11" ""
|
||||
END
|
||||
|
||||
NUMBER 20
|
||||
BEGIN
|
||||
KEY "SOMREGCONV"
|
||||
PROMPT 47 9 ""
|
||||
FIELD SOMREGCONV
|
||||
PICTURE "###.###.###^^^"
|
||||
SPECIAL STRING TRASFER "AU001020" ""
|
||||
SPECIAL STRING DYLOG "NU,240,11" ""
|
||||
END
|
||||
|
||||
NUMBER 21
|
||||
BEGIN
|
||||
KEY "SOMME NON SOGGETTE A RITENUTA"
|
||||
PROMPT 66 9 ""
|
||||
FIELD SOMME
|
||||
PICTURE "###.###.###^^^"
|
||||
SPECIAL STRING TRASFER "AU001021" ""
|
||||
SPECIAL STRING DYLOG "NU,251,11" ""
|
||||
END
|
||||
|
||||
NUMBER 22
|
||||
BEGIN
|
||||
KEY "IMPONIBILE"
|
||||
PROMPT 88 9 ""
|
||||
FIELD IMPONIBILE
|
||||
PICTURE "###.###.###^^^"
|
||||
SPECIAL STRING TRASFER "AU001022" ""
|
||||
SPECIAL STRING DYLOG "NU,262,11" ""
|
||||
END
|
||||
|
||||
NUMBER 23
|
||||
BEGIN
|
||||
KEY "Ritenute operate"
|
||||
PROMPT 109 9 ""
|
||||
FIELD IMPORTO
|
||||
PICTURE "###.###.###^^^"
|
||||
SPECIAL STRING TRASFER "AU001023" ""
|
||||
SPECIAL STRING DYLOG "NU,273,11" ""
|
||||
END
|
||||
|
||||
NUMBER 24
|
||||
BEGIN
|
||||
KEY "RITENUTE SOSPESE"
|
||||
PROMPT 109 9 ""
|
||||
FIELD RITSOSPESE
|
||||
SPECIAL STRING TRASFER "AU001024" ""
|
||||
SPECIAL STRING DYLOG "NU,284,11" ""
|
||||
END
|
||||
|
||||
NUMBER 25
|
||||
BEGIN
|
||||
KEY "ADDIZIONALE REGIONALE"
|
||||
PROMPT 109 9 ""
|
||||
FIELD ADDREG
|
||||
SPECIAL STRING TRASFER "AU001025" ""
|
||||
SPECIAL STRING DYLOG "NU,295,11" ""
|
||||
END
|
||||
|
||||
NUMBER 26
|
||||
BEGIN
|
||||
KEY "ADDIZIONALE REGIONALE SOSPESA"
|
||||
PROMPT 109 9 ""
|
||||
FIELD ADDREGSOSP
|
||||
SPECIAL STRING TRASFER "AU001026" ""
|
||||
SPECIAL STRING DYLOG "NU,306,11" ""
|
||||
END
|
||||
|
||||
NUMBER 27
|
||||
BEGIN
|
||||
KEY "IMPONIBILE ANNI PRECEDENTI"
|
||||
PROMPT 109 9 ""
|
||||
FIELD IMPANNIPRE
|
||||
SPECIAL STRING TRASFER "AU001027" ""
|
||||
SPECIAL STRING DYLOG "NU,317,11" ""
|
||||
END
|
||||
|
||||
NUMBER 28
|
||||
BEGIN
|
||||
KEY "RITENUTE ANNI PRECEDENTI"
|
||||
PROMPT 109 9 ""
|
||||
FIELD RITANNIPRE
|
||||
SPECIAL STRING TRASFER "AU001028" ""
|
||||
SPECIAL STRING DYLOG "NU,328,11" ""
|
||||
END
|
||||
|
||||
END
|
||||
|
||||
157
m770/77qst.frm
157
m770/77qst.frm
@ -34,11 +34,20 @@ BEGIN
|
||||
SPECIAL STRINGA DYLOG "NU,2,4" ""
|
||||
END
|
||||
|
||||
NUMERO 101
|
||||
BEGIN
|
||||
KEY "PERIODO DI RIFERIMENTO"
|
||||
PROMPT 9 2 ""
|
||||
MESSAGE _PERIODO_RIF
|
||||
SPECIAL STRINGA TRASFER "ST002001" "NU"
|
||||
END
|
||||
|
||||
NUMERO 2
|
||||
BEGIN
|
||||
KEY "RITENUTE"
|
||||
PROMPT 79 2 ""
|
||||
FIELD QLRITEFF
|
||||
SPECIAL STRINGA TRASFER "ST002002" ""
|
||||
SPECIAL STRINGA DYLOG "NU,6,11" ""
|
||||
END
|
||||
|
||||
@ -46,6 +55,8 @@ NUMERO 3
|
||||
BEGIN
|
||||
KEY "RITENUTE NON VERSATE PER ECCESSO E RESTITUZIONI"
|
||||
PROMPT 79 2 ""
|
||||
FIELD QLRITVEREC
|
||||
SPECIAL STRINGA TRASFER "ST002003" ""
|
||||
SPECIAL STRINGA DYLOG "NU,17,11" ""
|
||||
END
|
||||
|
||||
@ -53,14 +64,17 @@ NUMERO 4
|
||||
BEGIN
|
||||
KEY "RITENUTE NON VERSATE PER CREDITI"
|
||||
PROMPT 79 2 ""
|
||||
FIELD QLRITCOMP
|
||||
SPECIAL STRINGA TRASFER "ST002004" ""
|
||||
SPECIAL STRINGA DYLOG "NU,28,11" ""
|
||||
END
|
||||
|
||||
NUMERO 5
|
||||
BEGIN
|
||||
KEY "TOTALE IMPORTO VERSATO"
|
||||
KEY "DIFFERENZA"
|
||||
PROMPT 79 2 ""
|
||||
FIELD QLRITVER
|
||||
MESSAGE _NUMEXPR,#2-#3-#4
|
||||
SPECIAL STRINGA TRASFER "ST002005" "CU"
|
||||
SPECIAL STRINGA DYLOG "NU,39,11" ""
|
||||
END
|
||||
|
||||
@ -68,6 +82,8 @@ NUMERO 6
|
||||
BEGIN
|
||||
KEY "INTERESSI VERSATI"
|
||||
PROMPT 79 2 ""
|
||||
FIELD QLINTERESS
|
||||
SPECIAL STRINGA TRASFER "ST002006" ""
|
||||
SPECIAL STRINGA DYLOG "NU,50,11" ""
|
||||
END
|
||||
|
||||
@ -76,14 +92,34 @@ BEGIN
|
||||
KEY "NOTE"
|
||||
PROMPT 79 2 ""
|
||||
FIELD QLNOTE
|
||||
SPECIAL STRINGA TRASFER "ST002007" ""
|
||||
SPECIAL STRINGA DYLOG "AN,61,10" ""
|
||||
END
|
||||
|
||||
STRINGA 8
|
||||
BEGIN
|
||||
KEY "Eventi eccezionali"
|
||||
PROMPT 79 2 ""
|
||||
FIELD QLEVENTI
|
||||
SPECIAL STRINGA TRASFER "ST002008" ""
|
||||
SPECIAL STRINGA DYLOG "AN,71,10" ""
|
||||
END
|
||||
|
||||
STRINGA 9
|
||||
BEGIN
|
||||
KEY "Diversa valuta"
|
||||
PROMPT 79 2 ""
|
||||
FIELD QLVALDIV
|
||||
SPECIAL STRINGA TRASFER "ST002009" ""
|
||||
SPECIAL STRINGA DYLOG "AN,81,1" ""
|
||||
END
|
||||
|
||||
STRINGA 10
|
||||
BEGIN
|
||||
KEY "CODICE TRIBUTO"
|
||||
PROMPT 79 2 ""
|
||||
FIELD QLCT
|
||||
SPECIAL STRINGA TRASFER "ST002010" "AN"
|
||||
SPECIAL STRINGA DYLOG "AN,82,4" ""
|
||||
END
|
||||
|
||||
@ -92,121 +128,38 @@ BEGIN
|
||||
KEY "ARTICOLO"
|
||||
PROMPT 79 2 ""
|
||||
FIELD QLAB
|
||||
SPECIAL STRINGA TRASFER "ST002011" ""
|
||||
SPECIAL STRINGA DYLOG "NU,86,2" ""
|
||||
END
|
||||
|
||||
NUMERO 12
|
||||
LISTA 120
|
||||
BEGIN
|
||||
KEY "Codice regione"
|
||||
SPECIAL STRINGA DYLOG "NU,88,2" ""
|
||||
END
|
||||
|
||||
LISTA 130
|
||||
BEGIN
|
||||
KEY "Concessione/Tesoreria/F24"
|
||||
ITEM "|"
|
||||
MESSAGE "",13
|
||||
ITEM "C|Concessione"
|
||||
MESSAGE "F",13
|
||||
ITEM "F|F24"
|
||||
MESSAGE "F",13
|
||||
ITEM "T|TESORERIA"
|
||||
MESSAGE "T",13
|
||||
KEY "Tesoreria"
|
||||
PROMPT 79 2 ""
|
||||
FIELD QLLV
|
||||
ITEM " | " MESSAGE " ",12
|
||||
ITEM "C| " MESSAGE " ",12
|
||||
ITEM "T|X" MESSAGE "X",12
|
||||
END
|
||||
|
||||
STRINGA 13
|
||||
STRINGA 12
|
||||
BEGIN
|
||||
KEY "Tesoreria/F24"
|
||||
KEY "Tesoreria"
|
||||
PROMPT 79 2 ""
|
||||
SPECIAL STRINGA DYLOG "AN,90,1" ""
|
||||
SPECIAL STRINGA TRASFER "ST002012" "BO"
|
||||
SPECIAL STRINGA DYLOG "AN,88,1" ""
|
||||
END
|
||||
|
||||
NUMERO 14
|
||||
BEGIN
|
||||
KEY "DATA VERSAMENTO"
|
||||
PROMPT 79 2 ""
|
||||
FIELD QLDV
|
||||
SPECIAL STRINGA DYLOG "NU,91,8" ""
|
||||
END
|
||||
|
||||
END
|
||||
|
||||
SECTION BODY EVEN 2
|
||||
NUMERO 13
|
||||
|
||||
NUMERO 1
|
||||
BEGIN
|
||||
KEY "MESE RIFERIMENTO"
|
||||
PROMPT 9 2 ""
|
||||
FIELD QLMP
|
||||
SPECIAL STRINGA DYLOG "NU,0,2" ""
|
||||
END
|
||||
|
||||
NUMERO 1
|
||||
BEGIN
|
||||
KEY "ANNO RIFERIMENTO"
|
||||
PROMPT 42 2 ""
|
||||
FIELD QLAP
|
||||
SPECIAL STRINGA DYLOG "NU,2,4" ""
|
||||
END
|
||||
|
||||
NUMERO 2
|
||||
BEGIN
|
||||
KEY "RITENUTE"
|
||||
KEY "Regione"
|
||||
PROMPT 79 2 ""
|
||||
FIELD QLRITEFF
|
||||
SPECIAL STRINGA DYLOG "NU,6,11" ""
|
||||
END
|
||||
|
||||
NUMERO 3
|
||||
BEGIN
|
||||
KEY "RITENUTE NON VERSATE PER ECCESSO E RESTITUZIONI"
|
||||
PROMPT 79 2 ""
|
||||
SPECIAL STRINGA DYLOG "NU,17,11" ""
|
||||
END
|
||||
|
||||
NUMERO 4
|
||||
BEGIN
|
||||
KEY "RITENUTE NON VERSATE PER CREDITI"
|
||||
PROMPT 79 2 ""
|
||||
SPECIAL STRINGA DYLOG "NU,28,11" ""
|
||||
END
|
||||
|
||||
NUMERO 5
|
||||
BEGIN
|
||||
KEY "TOTALE IMPORTO VERSATO"
|
||||
PROMPT 79 2 ""
|
||||
FIELD QLRITVER
|
||||
SPECIAL STRINGA DYLOG "NU,39,11" ""
|
||||
END
|
||||
|
||||
NUMERO 6
|
||||
BEGIN
|
||||
KEY "INTERESSI VERSATI"
|
||||
PROMPT 79 2 ""
|
||||
SPECIAL STRINGA DYLOG "NU,50,11" ""
|
||||
END
|
||||
|
||||
NUMERO 7
|
||||
BEGIN
|
||||
KEY "???"
|
||||
PROMPT 79 2 ""
|
||||
SPECIAL STRINGA DYLOG "NU,61,11" ""
|
||||
END
|
||||
|
||||
NUMERO 12
|
||||
BEGIN
|
||||
KEY "Codice regione"
|
||||
SPECIAL STRINGA DYLOG "NU,97,2" ""
|
||||
END
|
||||
|
||||
NUMERO 14
|
||||
BEGIN
|
||||
KEY "DATA VERSAMENTO"
|
||||
PROMPT 79 2 ""
|
||||
FIELD QLDV
|
||||
SPECIAL STRINGA DYLOG "NU,100,8" ""
|
||||
END
|
||||
|
||||
END
|
||||
|
||||
SPECIAL STRINGA TRASFER "ST002013" "NU"
|
||||
SPECIAL STRINGA DYLOG "NU,89,2" ""
|
||||
FIELD QLREGIONE
|
||||
END
|
||||
@ -81,21 +81,22 @@ void TStampa_riepilogo::main_loop()
|
||||
from.put("CODDITTA",_currfirm);
|
||||
if (_riepilogo == "SL/SK")
|
||||
from.put("QLAP", _curryear); // E' necessario filtrare anche l'anno !?
|
||||
TRectype to(from);
|
||||
cur->setregion(from, to);
|
||||
|
||||
const int hh = 6;
|
||||
const int fl = printer().formlen();
|
||||
int rows[4];
|
||||
rows[0] = hh-2;
|
||||
rows[1] = hh;
|
||||
rows[2] = fl-1;
|
||||
rows[3] = 0;
|
||||
_frm->genera_intestazioni(odd_page, hh-1);
|
||||
_frm->genera_fincatura(odd_page, hh-2, fl-1, rows);
|
||||
cur->setregion(from, from);
|
||||
|
||||
if (cur->items() > 0)
|
||||
{
|
||||
const int hh = 6;
|
||||
const int fl = printer().formlen();
|
||||
int rows[4];
|
||||
rows[0] = hh-3;
|
||||
rows[1] = hh;
|
||||
rows[2] = fl-1;
|
||||
rows[3] = 0;
|
||||
_frm->genera_intestazioni(odd_page, hh-2);
|
||||
_frm->genera_fincatura(odd_page, hh-3, fl-1, rows);
|
||||
|
||||
_frm->print();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
137
m770/77srla.frm
137
m770/77srla.frm
@ -47,11 +47,11 @@ END
|
||||
NUMERO 4 40
|
||||
BEGIN
|
||||
KEY "Intestazione stampa"
|
||||
PROMPT 55 2 "Stampa riepilogo LA"
|
||||
PROMPT 55 2 "@bStampa riepilogo LA"
|
||||
END
|
||||
END
|
||||
SECTION BODY ODD 2 COLUMWISE
|
||||
STRINGA 1 50
|
||||
SECTION BODY ODD 3 COLUMWISE
|
||||
STRINGA 1 25 3
|
||||
BEGIN
|
||||
SPECIAL STRINGA INTESTAZIONE "Ragione Sociale" "Ragione Sociale"
|
||||
SPECIAL NUMERO OFFSET "0" "Offset iniziale campo"
|
||||
@ -61,63 +61,144 @@ BEGIN
|
||||
FIELD 216@->RAGSOC
|
||||
END
|
||||
|
||||
STRINGA 2 15
|
||||
STRINGA 16 5
|
||||
BEGIN
|
||||
SPECIAL STRINGA INTESTAZIONE "@cCausale" "Causale"
|
||||
SPECIAL STRINGA INTESTAZIONE "@cCaus." "Causale"
|
||||
SPECIAL NUMERO OFFSET "0" "Offset iniziale campo"
|
||||
SPECIAL STRINGA FINCATURA "XX" "Fincatura sinistra e destra"
|
||||
KEY "CAUSALE"
|
||||
PROMPT 2 1 ""
|
||||
FIELD CAUSALE
|
||||
END
|
||||
VALUTA 3 14
|
||||
|
||||
STRINGA 17 4
|
||||
BEGIN
|
||||
SPECIAL STRINGA INTESTAZIONE "@cTotale" "Tot."
|
||||
SPECIAL STRINGA INTESTAZIONE "@cAnno" "Anno"
|
||||
SPECIAL NUMERO OFFSET "0" "Offset iniziale campo"
|
||||
SPECIAL STRINGA FINCATURA "XX" "Fincatura sinistra e destra"
|
||||
KEY "Anno"
|
||||
PROMPT 3 1 ""
|
||||
FIELD ANNO
|
||||
END
|
||||
|
||||
STRINGA 18 6
|
||||
BEGIN
|
||||
SPECIAL STRINGA INTESTAZIONE "@cAntic." "Anticipazione"
|
||||
SPECIAL NUMERO OFFSET "0" "Offset iniziale campo"
|
||||
SPECIAL STRINGA FINCATURA "XX" "Fincatura sinistra e destra"
|
||||
KEY "Anticipazione"
|
||||
PROMPT 4 1 ""
|
||||
FIELD ANTICIPAZ
|
||||
END
|
||||
|
||||
VALUTA 19 15
|
||||
BEGIN
|
||||
SPECIAL STRINGA INTESTAZIONE "@cAmmontare lordo" "Tot."
|
||||
SPECIAL NUMERO OFFSET "0" "Offset iniziale campo"
|
||||
SPECIAL STRINGA FINCATURA "XX" "Fincatura sinistra e destra"
|
||||
KEY "TOTALE"
|
||||
PROMPT 3 1 ""
|
||||
KEY "Ammontare lordo corrisposto"
|
||||
PROMPT 5 1 ""
|
||||
FIELD TOTALE
|
||||
PICTURE "###.###.###^^^"
|
||||
END
|
||||
VALUTA 4 15
|
||||
|
||||
VALUTA 20 15
|
||||
BEGIN
|
||||
SPECIAL STRINGA INTESTAZIONE "Somme non sogg." "Somme non sogg."
|
||||
SPECIAL NUMERO OFFSET "0" "Offset iniziale campo"
|
||||
SPECIAL STRINGA FINCATURA "XX" "Fincatura sinistra e destra"
|
||||
KEY "SOMME NON SOGGETTE A RITENUTA"
|
||||
PROMPT 4 1 ""
|
||||
FIELD SOMME
|
||||
PICTURE "###.###.###^^^"
|
||||
END
|
||||
VALUTA 5 15
|
||||
BEGIN
|
||||
SPECIAL STRINGA INTESTAZIONE "Som. Reg. Conv." "Som. Reg. Conv"
|
||||
SPECIAL STRINGA INTESTAZIONE "Somme non sogg. regime conv." "Som. Reg. Conv"
|
||||
SPECIAL NUMERO OFFSET "0" "Offset iniziale campo"
|
||||
SPECIAL STRINGA FINCATURA "XX" "Fincatura sinistra e destra"
|
||||
KEY "SOMREGCONV"
|
||||
PROMPT 5 1 ""
|
||||
PROMPT 6 1 ""
|
||||
FIELD SOMREGCONV
|
||||
PICTURE "###.###.###^^^"
|
||||
END
|
||||
VALUTA 6 14
|
||||
|
||||
VALUTA 21 15
|
||||
BEGIN
|
||||
SPECIAL STRINGA INTESTAZIONE "Altre somme non soggette" "Somme non sogg."
|
||||
SPECIAL NUMERO OFFSET "0" "Offset iniziale campo"
|
||||
SPECIAL STRINGA FINCATURA "XX" "Fincatura sinistra e destra"
|
||||
KEY "SOMME NON SOGGETTE A RITENUTA"
|
||||
PROMPT 7 1 ""
|
||||
FIELD SOMME
|
||||
PICTURE "###.###.###^^^"
|
||||
END
|
||||
|
||||
VALUTA 22 15
|
||||
BEGIN
|
||||
SPECIAL STRINGA INTESTAZIONE "@cImponibile" "Imponibile"
|
||||
SPECIAL NUMERO OFFSET "0" "Offset iniziale campo"
|
||||
SPECIAL STRINGA FINCATURA "XX" "Fincatura sinistra e destra"
|
||||
KEY "IMPONIBILE"
|
||||
PROMPT 6 1 ""
|
||||
PROMPT 8 1 ""
|
||||
FIELD IMPONIBILE
|
||||
PICTURE "###.###.###^^^"
|
||||
END
|
||||
VALUTA 7 14
|
||||
|
||||
VALUTA 23 15
|
||||
BEGIN
|
||||
SPECIAL STRINGA INTESTAZIONE "@cImporto" "Importo"
|
||||
SPECIAL STRINGA INTESTAZIONE "@cRitenute" "Ritenute"
|
||||
SPECIAL NUMERO OFFSET "0" "Offset iniziale campo"
|
||||
SPECIAL STRINGA FINCATURA "XX" "Fincatura sinistra e destra"
|
||||
KEY "IMPORTO"
|
||||
PROMPT 7 1 ""
|
||||
KEY "Ritenute"
|
||||
PROMPT 9 1 ""
|
||||
FIELD IMPORTO
|
||||
PICTURE "###.###.###^^^"
|
||||
END
|
||||
|
||||
VALUTA 24 15
|
||||
BEGIN
|
||||
SPECIAL STRINGA INTESTAZIONE "@cAmmontare lordo Ritenute sosp." "Ritenute sospese"
|
||||
SPECIAL NUMERO OFFSET "0" "Offset iniziale campo"
|
||||
SPECIAL STRINGA FINCATURA "XX" "Fincatura sinistra e destra"
|
||||
KEY "Ritenute sospese"
|
||||
PROMPT 5 2 ""
|
||||
FIELD RITSOSPESE
|
||||
PICTURE "###.###.###^^^"
|
||||
END
|
||||
|
||||
VALUTA 25 15
|
||||
BEGIN
|
||||
SPECIAL STRINGA INTESTAZIONE "@cSom. Reg. Conv. Addiz. region." "Addizionale regionale"
|
||||
SPECIAL NUMERO OFFSET "0" "Offset iniziale campo"
|
||||
SPECIAL STRINGA FINCATURA "XX" "Fincatura sinistra e destra"
|
||||
KEY "Addizionale regionale"
|
||||
PROMPT 6 2 ""
|
||||
FIELD ADDREG
|
||||
PICTURE "###.###.###^^^"
|
||||
END
|
||||
|
||||
VALUTA 26 15
|
||||
BEGIN
|
||||
SPECIAL STRINGA INTESTAZIONE "@cAltre somme Add. reg. sosp." "Addizionale regionale sospesa"
|
||||
SPECIAL NUMERO OFFSET "0" "Offset iniziale campo"
|
||||
SPECIAL STRINGA FINCATURA "XX" "Fincatura sinistra e destra"
|
||||
KEY "Addizionale regionale sospesa"
|
||||
PROMPT 7 2 ""
|
||||
FIELD ADDREGSOSP
|
||||
PICTURE "###.###.###^^^"
|
||||
END
|
||||
|
||||
VALUTA 27 15
|
||||
BEGIN
|
||||
SPECIAL STRINGA INTESTAZIONE "@cImponibile Imp. anni prec." "Imponibile anni precedenti"
|
||||
SPECIAL NUMERO OFFSET "0" "Offset iniziale campo"
|
||||
SPECIAL STRINGA FINCATURA "XX" "Fincatura sinistra e destra"
|
||||
KEY "Imponibile anni precedenti"
|
||||
PROMPT 8 2 ""
|
||||
FIELD IMPANNIPRE
|
||||
PICTURE "###.###.###^^^"
|
||||
END
|
||||
|
||||
VALUTA 28 15
|
||||
BEGIN
|
||||
SPECIAL STRINGA INTESTAZIONE "@cRitenute Rit. anni prec." "Ritenute anni precedenti"
|
||||
SPECIAL NUMERO OFFSET "0" "Offset iniziale campo"
|
||||
SPECIAL STRINGA FINCATURA "XX" "Fincatura sinistra e destra"
|
||||
KEY "Ritenute anni precedenti"
|
||||
PROMPT 9 2 ""
|
||||
FIELD RITANNIPRE
|
||||
PICTURE "###.###.###^^^"
|
||||
END
|
||||
|
||||
END
|
||||
|
||||
233
m770/77srst.frm
233
m770/77srst.frm
@ -5,7 +5,7 @@ END
|
||||
|
||||
DESCRIPTION
|
||||
BEGIN
|
||||
42->* "Quadro L"
|
||||
42->* "Quadro ST"
|
||||
9->* "Anagrafica ditte"
|
||||
END
|
||||
|
||||
@ -40,159 +40,162 @@ END
|
||||
NUMERO 4 40
|
||||
BEGIN
|
||||
KEY "Intestazione stampa"
|
||||
PROMPT 55 2 "Stampa riepilogo ST"
|
||||
PROMPT 55 2 "@bStampa riepilogo ST"
|
||||
END
|
||||
|
||||
END
|
||||
|
||||
SECTION BODY ODD 2 COLUMNWISE
|
||||
SECTION BODY ODD 1 COLUMNWISE
|
||||
|
||||
DATA 1 12
|
||||
NUMERO 1 2
|
||||
BEGIN
|
||||
KEY "Data versamento"
|
||||
SPECIAL STRINGA INTESTAZIONE "@cData ver." "Data ver."
|
||||
SPECIAL STRINGA INTESTAZIONE "@cM." "Mese"
|
||||
SPECIAL NUMERO OFFSET "0" "Offset iniziale campo"
|
||||
SPECIAL STRINGA FINCATURA "XX" "Fincatura sinistra e destra"
|
||||
KEY "Mese"
|
||||
PROMPT 1 1 ""
|
||||
FIELD 42->QLDV
|
||||
END
|
||||
|
||||
LISTA 2 10
|
||||
BEGIN
|
||||
SPECIAL STRINGA INTESTAZIONE "@cMese rif." "Mese rif."
|
||||
SPECIAL NUMERO OFFSET "0" "Offset iniziale campo"
|
||||
SPECIAL STRINGA FINCATURA "XX" "Fincatura sinistra e destra"
|
||||
KEY "Mese rif."
|
||||
PROMPT 2 1 ""
|
||||
PICTURE "@@"
|
||||
FIELD 42->QLMP
|
||||
ITEM " | "
|
||||
ITEM "1|Gennaio"
|
||||
ITEM "2|Febbraio"
|
||||
ITEM "3|Marzo"
|
||||
ITEM "4|Aprile"
|
||||
ITEM "5|Maggio"
|
||||
ITEM "6|Giugno"
|
||||
ITEM "7|Luglio"
|
||||
ITEM "8|Agosto"
|
||||
ITEM "9|Settembre"
|
||||
ITEM "10|Ottobre"
|
||||
ITEM "11|Novembre"
|
||||
ITEM "12|Dicembre"
|
||||
END
|
||||
|
||||
LISTA 3 11
|
||||
NUMERO 101 4
|
||||
BEGIN
|
||||
SPECIAL STRINGA INTESTAZIONE "@cLuogo ver." "Luogo ver."
|
||||
SPECIAL STRINGA INTESTAZIONE "Anno" "Anno"
|
||||
SPECIAL NUMERO OFFSET "0" "Offset iniziale campo"
|
||||
SPECIAL STRINGA FINCATURA "XX" "Fincatura sinistra e destra"
|
||||
KEY "Luogo Versamento"
|
||||
KEY "Anno"
|
||||
PROMPT 2 1 ""
|
||||
FIELD 42->QLAP
|
||||
END
|
||||
|
||||
VALUTA 2 15
|
||||
BEGIN
|
||||
SPECIAL STRINGA INTESTAZIONE "@cRitenute operate" "Ritenute operate"
|
||||
SPECIAL NUMERO OFFSET "0" "Offset iniziale campo"
|
||||
SPECIAL STRINGA FINCATURA "XX" "Fincatura sinistra e destra"
|
||||
KEY "Ritenute operate"
|
||||
PROMPT 3 1 ""
|
||||
FIELD 42->QLLV
|
||||
ITEM " | "
|
||||
ITEM "C|F24"
|
||||
ITEM "T|Tesoreria"
|
||||
END
|
||||
|
||||
LISTA 4 14
|
||||
BEGIN
|
||||
SPECIAL STRINGA INTESTAZIONE "@cTipo ver." "Tipo ver."
|
||||
SPECIAL NUMERO OFFSET "0" "Offset iniziale campo"
|
||||
SPECIAL STRINGA FINCATURA "XX" "Fincatura sinistra e destra"
|
||||
KEY "Tipo versamento"
|
||||
PROMPT 4 1 ""
|
||||
FIELD 42->QLTV
|
||||
ITEM " | "
|
||||
ITEM "B|Del. bancaria"
|
||||
ITEM "C|C/C postale"
|
||||
ITEM "D|Distinta"
|
||||
END
|
||||
|
||||
NUMERO 5 7
|
||||
BEGIN
|
||||
SPECIAL STRINGA INTESTAZIONE "@cCod. T." "Cod. T."
|
||||
SPECIAL NUMERO OFFSET "0" "Offset iniziale campo"
|
||||
SPECIAL STRINGA FINCATURA "XX" "Fincatura sinistra e destra"
|
||||
KEY "Codice tributo"
|
||||
PROMPT 5 1 ""
|
||||
FIELD 42->QLCT
|
||||
END
|
||||
|
||||
NUMERO 6 9
|
||||
BEGIN
|
||||
SPECIAL STRINGA INTESTAZIONE "@cArt. Bil." "Art. Bil."
|
||||
SPECIAL NUMERO OFFSET "0" "Offset iniziale campo"
|
||||
SPECIAL STRINGA FINCATURA "XX" "Fincatura sinistra e destra"
|
||||
KEY "Articolo di bilancio"
|
||||
PROMPT 6 1 ""
|
||||
FIELD 42->QLAB
|
||||
END
|
||||
|
||||
STRINGA 7 7
|
||||
BEGIN
|
||||
SPECIAL STRINGA INTESTAZIONE "@cCod. q." "Cod. q."
|
||||
SPECIAL NUMERO OFFSET "0" "Offset iniziale campo"
|
||||
SPECIAL STRINGA FINCATURA "XX" "Fincatura sinistra e destra"
|
||||
KEY "Codice quadro"
|
||||
PROMPT 7 1 ""
|
||||
FIELD 42->QLCODQUA
|
||||
END
|
||||
|
||||
STRINGA 8 5
|
||||
BEGIN
|
||||
SPECIAL STRINGA INTESTAZIONE "@cSerie" "Serie"
|
||||
SPECIAL NUMERO OFFSET "0" "Offset iniziale campo"
|
||||
SPECIAL STRINGA FINCATURA "XX" "Fincatura sinistra e destra"
|
||||
KEY "SERIE"
|
||||
PROMPT 8 1 ""
|
||||
FIELD 42->QLSERIE
|
||||
END
|
||||
|
||||
VALUTA 9 15
|
||||
BEGIN
|
||||
SPECIAL STRINGA INTESTAZIONE "@cRit. effettuate" "Rit. effettuate"
|
||||
SPECIAL NUMERO OFFSET "0" "Offset iniziale campo"
|
||||
SPECIAL STRINGA FINCATURA "XX" "Fincatura sinistra e destra"
|
||||
KEY "Ritenute effettuate"
|
||||
PROMPT 9 1 ""
|
||||
FIELD 42->QLRITEFF
|
||||
PICTURE "###.###.###.###^^^"
|
||||
END
|
||||
|
||||
VALUTA 10 15
|
||||
VALUTA 3 15
|
||||
BEGIN
|
||||
SPECIAL STRINGA INTESTAZIONE "@cImp. Versato" "Imp. Versato"
|
||||
SPECIAL STRINGA INTESTAZIONE "@cRit. versate in eccesso" "Rit. versate in eccesso"
|
||||
SPECIAL NUMERO OFFSET "0" "Offset iniziale campo"
|
||||
SPECIAL STRINGA FINCATURA "XX" "Fincatura sinistra e destra"
|
||||
KEY "Importo versato"
|
||||
PROMPT 10 1 ""
|
||||
FIELD 42->QLRITVER
|
||||
KEY "Ritenute operate"
|
||||
PROMPT 4 1 ""
|
||||
FIELD 42->QLRITVEREC
|
||||
PICTURE "###.###.###.###^^^"
|
||||
END
|
||||
|
||||
LISTA 11 3
|
||||
VALUTA 4 15
|
||||
BEGIN
|
||||
SPECIAL STRINGA INTESTAZIONE "@cRSS" "RSS"
|
||||
SPECIAL STRINGA INTESTAZIONE "@cRitenute compensate" "Rit. compensate"
|
||||
SPECIAL NUMERO OFFSET "0" "Offset iniziale campo"
|
||||
SPECIAL STRINGA FINCATURA "XX" "Fincatura sinistra e destra"
|
||||
KEY "RSS"
|
||||
PROMPT 11 1 ""
|
||||
ITEM " | "
|
||||
ITEM "1|VA"
|
||||
ITEM "2|SA"
|
||||
ITEM "3|SI"
|
||||
FIELD 42->QLRSS
|
||||
KEY "Ritenute compensate"
|
||||
PROMPT 5 1 ""
|
||||
FIELD 42->QLRITCOMP
|
||||
PICTURE "###.###.###.###^^^"
|
||||
END
|
||||
|
||||
STRINGA 12 7
|
||||
VALUTA 5 15
|
||||
BEGIN
|
||||
SPECIAL STRINGA INTESTAZIONE "@cDifferenza" "Differenza"
|
||||
SPECIAL NUMERO OFFSET "0" "Offset iniziale campo"
|
||||
SPECIAL STRINGA FINCATURA "XX" "Fincatura sinistra e destra"
|
||||
KEY "Differenza"
|
||||
PROMPT 6 1 ""
|
||||
MESSAGE _NUMEXPR,#2-#3-#4
|
||||
PICTURE "###.###.###.###^^^"
|
||||
END
|
||||
|
||||
VALUTA 6 15
|
||||
BEGIN
|
||||
SPECIAL STRINGA INTESTAZIONE "@cInteressi" "Interessi"
|
||||
SPECIAL NUMERO OFFSET "0" "Offset iniziale campo"
|
||||
SPECIAL STRINGA FINCATURA "XX" "Fincatura sinistra e destra"
|
||||
KEY "Interessi"
|
||||
PROMPT 7 1 ""
|
||||
FIELD 42->QLINTERESS
|
||||
PICTURE "###.###.###.###^^^"
|
||||
END
|
||||
|
||||
STRINGA 7 7
|
||||
BEGIN
|
||||
SPECIAL STRINGA INTESTAZIONE "@cNote" "Note"
|
||||
SPECIAL NUMERO OFFSET "0" "Offset iniziale campo"
|
||||
SPECIAL STRINGA FINCATURA "XX" "Fincatura sinistra e destra"
|
||||
KEY "Note"
|
||||
PROMPT 12 1 ""
|
||||
PROMPT 8 1 ""
|
||||
FIELD 42->QLNOTE
|
||||
END
|
||||
|
||||
STRINGA 8 3
|
||||
BEGIN
|
||||
SPECIAL STRINGA INTESTAZIONE "Ev.Ecc" "Eventi eccezionali"
|
||||
SPECIAL NUMERO OFFSET "0" "Offset iniziale campo"
|
||||
SPECIAL STRINGA FINCATURA "XX" "Fincatura sinistra e destra"
|
||||
KEY "Eventi eccezionali"
|
||||
PROMPT 9 1 ""
|
||||
FIELD 42->QLEVENTI
|
||||
END
|
||||
|
||||
STRINGA 9 3
|
||||
BEGIN
|
||||
SPECIAL STRINGA INTESTAZIONE "DivVal" "Diversa valuta"
|
||||
SPECIAL NUMERO OFFSET "0" "Offset iniziale campo"
|
||||
SPECIAL STRINGA FINCATURA "XX" "Fincatura sinistra e destra"
|
||||
KEY "Versamento in diversa valuta"
|
||||
PROMPT 10 1 ""
|
||||
FIELD 42->QLVALDIV
|
||||
END
|
||||
|
||||
NUMERO 10 7
|
||||
BEGIN
|
||||
SPECIAL STRINGA INTESTAZIONE "@cCodice Tributo" "Cod. T."
|
||||
SPECIAL NUMERO OFFSET "0" "Offset iniziale campo"
|
||||
SPECIAL STRINGA FINCATURA "XX" "Fincatura sinistra e destra"
|
||||
KEY "Codice tributo"
|
||||
PROMPT 11 1 ""
|
||||
FIELD 42->QLCT
|
||||
END
|
||||
|
||||
NUMERO 11 9
|
||||
BEGIN
|
||||
SPECIAL STRINGA INTESTAZIONE "@cArticolo" "Articolo"
|
||||
SPECIAL NUMERO OFFSET "0" "Offset iniziale campo"
|
||||
SPECIAL STRINGA FINCATURA "XX" "Fincatura sinistra e destra"
|
||||
KEY "Articolo di bilancio"
|
||||
PROMPT 12 1 ""
|
||||
FIELD 42->QLAB
|
||||
END
|
||||
|
||||
LISTA 12 3
|
||||
BEGIN
|
||||
SPECIAL STRINGA INTESTAZIONE "@cTes" "Tesoreria"
|
||||
SPECIAL NUMERO OFFSET "0" "Offset iniziale campo"
|
||||
SPECIAL STRINGA FINCATURA "XX" "Fincatura sinistra e destra"
|
||||
KEY "Tesoreria"
|
||||
PROMPT 13 1 ""
|
||||
FIELD 42->QLLV
|
||||
ITEM " | "
|
||||
ITEM "C| "
|
||||
ITEM "T|X"
|
||||
END
|
||||
|
||||
STRINGA 13 3
|
||||
BEGIN
|
||||
SPECIAL STRINGA INTESTAZIONE "Reg" "Regione"
|
||||
SPECIAL NUMERO OFFSET "0" "Offset iniziale campo"
|
||||
SPECIAL STRINGA FINCATURA "XX" "Fincatura sinistra e destra"
|
||||
KEY "Regione"
|
||||
PROMPT 14 1 ""
|
||||
FIELD 42->QLREGIONE
|
||||
END
|
||||
|
||||
END
|
||||
|
||||
|
||||
|
||||
@ -116,7 +116,9 @@ END
|
||||
|
||||
STRING TCF_CAUSD 1
|
||||
BEGIN
|
||||
PROMPT 1 6 "Causale SC "
|
||||
PROMPT 1 6 "Causale LA "
|
||||
FLAGS "U"
|
||||
|
||||
SHEET "Codice|Descrizione@250"
|
||||
INPUT TCF_CAUSD
|
||||
ITEM " | "
|
||||
@ -165,6 +167,7 @@ END
|
||||
STRING TCF_CAUSD1 1
|
||||
BEGIN
|
||||
PROMPT 1 8 "Causale SE "
|
||||
FLAGS "U"
|
||||
SHEET "Codice|Descrizione@250"
|
||||
INPUT TCF_CAUSD1
|
||||
ITEM " | "
|
||||
@ -203,6 +206,7 @@ END
|
||||
STRING TCF_CAUSE 1
|
||||
BEGIN
|
||||
PROMPT 1 9 "Causale SF "
|
||||
FLAGS "U"
|
||||
SHEET "Codice|Descrizione@250"
|
||||
INPUT TCF_CAUSE
|
||||
ITEM " | "
|
||||
@ -250,6 +254,7 @@ END
|
||||
STRING TCF_CAUSE1 1
|
||||
BEGIN
|
||||
PROMPT 1 10 "Causale SG "
|
||||
FLAGS "U"
|
||||
SHEET "Codice|Descrizione@250"
|
||||
INPUT TCF_CAUSE1
|
||||
ITEM " | "
|
||||
@ -386,4 +391,3 @@ END
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
||||
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
42
|
||||
1
|
||||
m770/quadrol|0|0|104|0|Quadro L modello 770|#9||
|
||||
m770/quadrol|0|0|161|0|Quadro L modello 770|#9||
|
||||
|
||||
12
m770/f42.trr
12
m770/f42.trr
@ -1,5 +1,5 @@
|
||||
42
|
||||
15
|
||||
21
|
||||
CODDITTA|3|5|0|
|
||||
QLDV|5|8|0|
|
||||
QLMP|2|2|0|
|
||||
@ -11,10 +11,16 @@ QLAB|2|2|0|
|
||||
QLSERIE|1|5|0|
|
||||
QLNUMERO|1|11|0|
|
||||
QLCODQUA|1|2|0|
|
||||
QLRITEFF|4|18|2|
|
||||
QLRITVER|4|18|2|
|
||||
QLRITEFF|4|18|3|
|
||||
QLRITVER|4|18|3|
|
||||
QLRSS|1|2|0|
|
||||
QLNOTE|1|20|0|
|
||||
QLRITVEREC|4|18|3|
|
||||
QLRITCOMP|4|18|3|
|
||||
QLINTERESS|4|18|3|
|
||||
QLEVENTI|1|1|0|
|
||||
QLVALDIV|8|1|0|
|
||||
QLREGIONE|1|2|0|
|
||||
2
|
||||
CODDITTA+QLAP+QLMP+QLDV+QLLV+QLTV+QLCT+QLAB+QLSERIE+QLNUMERO|
|
||||
CODDITTA+QLDV+QLAP+QLMP+QLLV+QLTV+QLCT+QLAB+QLSERIE+QLNUMERO|
|
||||
|
||||
@ -675,17 +675,23 @@ int TApp_movmag::read(TMask& m)
|
||||
|
||||
void TApp_movmag::init_query_mode(TMask& m)
|
||||
{
|
||||
m.enable(F_INVENTORYMODE);
|
||||
m.enable(F_INVENTORYMODE);
|
||||
TRelation_application::init_query_mode(m);
|
||||
}
|
||||
void TApp_movmag::init_modify_mode(TMask& m)
|
||||
{
|
||||
m.disable(F_INVENTORYMODE);
|
||||
const bool inventory = m.get_bool(F_INVENTORYMODE);
|
||||
TSheet_field & ss = m.sfield(F_RIGHE);
|
||||
ss.sheet_mask().field(F_QUANT).check_type(inventory ? CHECK_NONE : CHECK_REQUIRED);
|
||||
TRelation_application::init_modify_mode(m);
|
||||
}
|
||||
void TApp_movmag::init_insert_mode(TMask& m)
|
||||
{
|
||||
m.disable(F_INVENTORYMODE);
|
||||
const bool inventory = m.get_bool(F_INVENTORYMODE);
|
||||
TSheet_field & ss = m.sfield(F_RIGHE);
|
||||
ss.sheet_mask().field(F_QUANT).check_type(inventory ? CHECK_NONE : CHECK_REQUIRED);
|
||||
TRelation_application::init_insert_mode(m);
|
||||
}
|
||||
|
||||
|
||||
@ -328,6 +328,15 @@ SPECIAL NUMERO OFFSET "0" "Offset iniziale campo"
|
||||
SPECIAL STRINGA FINCATURA "XX" "Fincatura sinistra e destra"
|
||||
FORMAT "1444-"
|
||||
END
|
||||
STRINGA 220 6
|
||||
BEGIN
|
||||
KEY "Rata bloccata"
|
||||
PROMPT 15 1 ""
|
||||
FLAGS "H"
|
||||
SPECIAL STRINGA INTESTAZIONE "Blocc." "Rata bloccata"
|
||||
SPECIAL NUMERO OFFSET "0" "Offset iniziale campo"
|
||||
SPECIAL STRINGA FINCATURA "XX" "Fincatura sinistra e destra"
|
||||
END
|
||||
END
|
||||
SECTION FOOTER ODD 9
|
||||
STRINGA 203
|
||||
|
||||
@ -107,12 +107,13 @@ class TEC_row : public TSortable
|
||||
long _num_prot; // Protocollo IVA
|
||||
long _num_reg; // Numero registrazione
|
||||
TImporto _importo; // Importo in valuta
|
||||
real _importo_lire; // Importo in lire
|
||||
real _importo_euro; // Importo in lire
|
||||
real _scaduto; // Importo scaduto
|
||||
real _esposto; // Importo esposto
|
||||
bool _salvo_buon_fine; // Importo esposto salvo buon fine
|
||||
real _totale; // Totale documento
|
||||
TValuta _valuta; // Codice valuta, data cambio e cambio
|
||||
bool _bloccata; // Rata bloccata
|
||||
|
||||
protected: // TSortable
|
||||
virtual int compare(const TSortable& s) const;
|
||||
@ -127,17 +128,18 @@ public:
|
||||
void reset_uguali();
|
||||
void descrizione(const char* s) { _descrizione = s; }
|
||||
void importo(const TImporto& i) { _importo = i; }
|
||||
void importo_lire(const real& i) { _importo_lire = i; }
|
||||
void importo_euro(const real& i) { _importo_euro = i; }
|
||||
void scaduto(const real& s) { _scaduto = s; }
|
||||
void esposto(const real& e) { _esposto = e; }
|
||||
void salvo_buon_fine(bool sbf) { _salvo_buon_fine = sbf; }
|
||||
void rata_bloccata(bool rb) { _bloccata = rb; }
|
||||
|
||||
const TString& causale() const { return _causale; }
|
||||
const TString& descrizione() const { return _descrizione; }
|
||||
long num_reg() const { return _num_reg; }
|
||||
const TDate& data() const { return _data; }
|
||||
const TImporto& importo() const { return _importo; }
|
||||
const real& importo_lire() const { return _importo_lire; }
|
||||
const real& importo_euro() const { return _importo_euro; }
|
||||
const real& scaduto() const { return _scaduto; }
|
||||
const real& esposto() const { return _esposto; }
|
||||
const TValuta& valuta() const { return _valuta; }
|
||||
@ -151,7 +153,7 @@ public:
|
||||
};
|
||||
|
||||
TEC_row::TEC_row(const TRiga_partite& row, const TDate& data, const TImporto& imp, int rata)
|
||||
: _salvo_buon_fine(FALSE)
|
||||
: _salvo_buon_fine(FALSE), _bloccata(FALSE)
|
||||
{
|
||||
_riga = row.get_int(PART_NRIGA);
|
||||
_rata = rata;
|
||||
@ -174,7 +176,7 @@ TEC_row::TEC_row(const TRiga_partite& row, const TDate& data, const TImporto& im
|
||||
|
||||
TEC_row::TEC_row(const char* desc, const TImporto& imp, const TValuta& val)
|
||||
: _riga(9999), _rata(9999), _num_doc(0),
|
||||
_num_prot(0), _num_reg(0), _salvo_buon_fine(FALSE)
|
||||
_num_prot(0), _num_reg(0), _salvo_buon_fine(FALSE), _bloccata(FALSE)
|
||||
{
|
||||
_descrizione = desc;
|
||||
_importo = imp; _importo.normalize();
|
||||
@ -283,14 +285,17 @@ void TEC_row::print_on(TPrint_section& body)
|
||||
TForm_item& totdoc = body.find_field(PEC_TOTDOC);
|
||||
set_imp(totdoc, _totale, cod_valuta);
|
||||
|
||||
TForm_item& lire = body.find_field(PEC_IMPLIRE);
|
||||
set_imp(lire, _importo_lire, ""); // In generale va espresso nella valuta della ditta
|
||||
TForm_item& lire = body.find_field(PEC_IMPEURO);
|
||||
set_imp(lire, _importo_euro, ""); // In generale va espresso nella valuta della ditta
|
||||
|
||||
TForm_item& cambio = body.find_field(PEC_CAMBIO);
|
||||
cambio.set(_valuta.cambio().string());
|
||||
|
||||
TForm_item& datacambio = body.find_field(PEC_DATACAM);
|
||||
datacambio.set(_valuta.data().string());
|
||||
|
||||
TForm_item& bloccata = body.find_field(PEC_BLOCCATA);
|
||||
bloccata.set(_bloccata ? "X" : "");
|
||||
|
||||
const TString80 old_prompt(descr.prompt());
|
||||
descr.set_prompt(""); // Nasconde temporaneamente il prompt per non stampare i <magic>
|
||||
@ -492,7 +497,6 @@ void TEC_array::add_row(const TRiga_partite& row)
|
||||
const TRiga_scadenze& rata = row.rata(r);
|
||||
const TDate data_scad(rata.get(SCAD_DATASCAD));
|
||||
TEC_row& rec = new_row(row, data_scad, rata.importo(in_valuta), r);
|
||||
|
||||
if (data_scad <= form().data_limite_scaduto())
|
||||
{
|
||||
const real s = calcola_scaduto(rata, in_valuta);
|
||||
@ -502,8 +506,9 @@ void TEC_array::add_row(const TRiga_partite& row)
|
||||
{
|
||||
TImporto il = rata.importo(FALSE);
|
||||
il.normalize(sezione);
|
||||
rec.importo_lire(il.valore());
|
||||
rec.importo_euro(il.valore());
|
||||
}
|
||||
rec.rata_bloccata(rata.get_bool(SCAD_BLOCCATA));
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -560,7 +565,7 @@ void TEC_array::add_row(const TRiga_partite& row)
|
||||
{
|
||||
TImporto il(row.importo(FALSE, 0x2));
|
||||
il.normalize(sezione);
|
||||
rec.importo_lire(il.valore());
|
||||
rec.importo_euro(il.valore());
|
||||
}
|
||||
}
|
||||
|
||||
@ -580,7 +585,7 @@ void TEC_array::add_row(const TRiga_partite& row)
|
||||
if (in_valuta)
|
||||
{
|
||||
ritenute.normalize(sezione);
|
||||
rec.importo_lire(ritenute.valore());
|
||||
rec.importo_euro(ritenute.valore());
|
||||
}
|
||||
else
|
||||
rec.importo(ritenute);
|
||||
@ -731,7 +736,7 @@ void TEC_form::stampa_riporti(TPrinter& pr)
|
||||
TEC_row rip(desc, t.importo().normalize(),val);
|
||||
rip.scaduto(t.scaduto());
|
||||
rip.esposto(t.esposto());
|
||||
rip.importo_lire(t.importo_lire());
|
||||
rip.importo_euro(t.importo_euro());
|
||||
rip.print_on(body);
|
||||
pr.setfooterline(j+1, body.row(0));
|
||||
}
|
||||
@ -813,7 +818,7 @@ void TEC_form::change_magic_footer(const THash_object& o, TString& s)
|
||||
void TEC_form::print_total(int riga, const THash_object& o)
|
||||
{
|
||||
const short MAXID = 4;
|
||||
const short f_id[MAXID] = { PEC_TSALDO, PEC_TSCADUTO, PEC_TESPOSTO, PEC_TIMPLIRE };
|
||||
const short f_id[MAXID] = { PEC_TSALDO, PEC_TSCADUTO, PEC_TESPOSTO, PEC_TIMPEURO };
|
||||
TString_array prompt(MAXID);
|
||||
|
||||
TPrint_section& foot = section('F');
|
||||
@ -889,10 +894,10 @@ void TEC_form::print_total(int riga, const THash_object& o)
|
||||
}
|
||||
esposto.set(t.esposto().string());
|
||||
|
||||
TForm_item& implire = foot.find_field(PEC_IMPLIRE);
|
||||
TForm_item& implire = foot.find_field(PEC_IMPEURO);
|
||||
if (implire.x() <= 0)
|
||||
{
|
||||
TForm_item& bimplire = body.find_field(PEC_IMPLIRE);
|
||||
TForm_item& bimplire = body.find_field(PEC_IMPEURO);
|
||||
implire.set_x(bimplire.x());
|
||||
esposto.width() = bimplire.width();
|
||||
if (bimplire.shown())
|
||||
@ -900,7 +905,7 @@ void TEC_form::print_total(int riga, const THash_object& o)
|
||||
else
|
||||
implire.hide();
|
||||
}
|
||||
implire.set(t.importo_lire().string());
|
||||
implire.set(t.importo_euro().string());
|
||||
|
||||
foot.update();
|
||||
|
||||
@ -1011,12 +1016,12 @@ bool TEC_form::print_game(const TPartita& game)
|
||||
codval = riga.valuta().codice();
|
||||
|
||||
totali().add(riga.importo(), riga.scaduto(), riga.esposto(),
|
||||
riga.importo_lire(), codval);
|
||||
riga.importo_euro(), codval);
|
||||
|
||||
saldo += riga.importo();
|
||||
scaduto += riga.scaduto();
|
||||
esposto += riga.esposto();
|
||||
implire += riga.importo_lire();
|
||||
implire += riga.importo_euro();
|
||||
ok = TRUE;
|
||||
}
|
||||
|
||||
@ -1035,7 +1040,7 @@ bool TEC_form::print_game(const TPartita& game)
|
||||
|
||||
sld.scaduto(scaduto);
|
||||
sld.esposto(esposto);
|
||||
sld.importo_lire(implire);
|
||||
sld.importo_euro(implire);
|
||||
sld.print_on(body);
|
||||
pr.print(body.row(0));
|
||||
}
|
||||
|
||||
@ -7,8 +7,8 @@
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
TTotal::TTotal(const TImporto& imp, const real& sca,
|
||||
const real& esp, const real& lit)
|
||||
: _importo(imp), _scaduto(sca), _esposto(esp), _importo_lire(lit)
|
||||
const real& esp, const real& eur)
|
||||
: _importo(imp), _scaduto(sca), _esposto(esp), _importo_euro(eur)
|
||||
{ }
|
||||
|
||||
TTotal::TTotal(const TImporto& uns)
|
||||
@ -29,7 +29,7 @@ void TTotalizer::add(const TImporto& imp, const real& sca,
|
||||
tot.importo() += imp;
|
||||
tot.scaduto() += sca;
|
||||
tot.esposto() += esp;
|
||||
tot.importo_lire() += lit;
|
||||
tot.importo_euro() += lit;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -19,17 +19,17 @@ class TTotal : public TObject
|
||||
TImporto _unassigned;
|
||||
real _scaduto;
|
||||
real _esposto;
|
||||
real _importo_lire;
|
||||
real _importo_euro;
|
||||
|
||||
public:
|
||||
const TImporto& importo() const { return _importo; }
|
||||
const TImporto& unassigned() const { return _unassigned; }
|
||||
const real& importo_lire() const { return _importo_lire; }
|
||||
const real& importo_euro() const { return _importo_euro; }
|
||||
const real& scaduto() const { return _scaduto; }
|
||||
const real& esposto() const { return _esposto; }
|
||||
TImporto& importo() { return _importo; }
|
||||
TImporto& unassigned() { return _unassigned; }
|
||||
real& importo_lire() { return _importo_lire; }
|
||||
real& importo_euro() { return _importo_euro; }
|
||||
real& scaduto() { return _scaduto; }
|
||||
real& esposto() { return _esposto; }
|
||||
|
||||
|
||||
@ -22,11 +22,12 @@
|
||||
#define PEC_SCADUTO 212
|
||||
#define PEC_ESPOSTO 213
|
||||
#define PEC_SBF 214
|
||||
#define PEC_IMPLIRE 215
|
||||
#define PEC_IMPEURO 215
|
||||
#define PEC_CAMBIO 216
|
||||
#define PEC_DATACAM 217
|
||||
#define PEC_PAGINA 218
|
||||
#define PEC_UNASSIGNED 219
|
||||
#define PEC_BLOCCATA 220
|
||||
|
||||
#define PEC_SALDO 301
|
||||
#define PEC_ABBUONI 302
|
||||
@ -38,7 +39,7 @@
|
||||
#define PEC_TSALDO 401
|
||||
#define PEC_TSCADUTO 402
|
||||
#define PEC_TESPOSTO 403
|
||||
#define PEC_TIMPLIRE 404
|
||||
#define PEC_TIMPEURO 404
|
||||
#define PEC_TUNASSIGNED 405
|
||||
|
||||
#define PEC_PICTURE 500
|
||||
|
||||
@ -265,7 +265,7 @@ void TESSL_row::print_on(TPrint_section& body)
|
||||
dare.set("");
|
||||
}
|
||||
|
||||
TForm_item& importo_in_lire = body.find_field(PEC_IMPLIRE);
|
||||
TForm_item& importo_in_lire = body.find_field(PEC_IMPEURO);
|
||||
//importo_in_lire.set(_importo_lire.string());
|
||||
set_imp(importo_in_lire, _importo_lire, ""); // In generale va espresso nella valuta della ditta
|
||||
|
||||
@ -716,7 +716,7 @@ void TESSL_form::stampa_riporti(TPrinter& pr)
|
||||
TESSL_row rip(desc, t.importo().normalize(),val);
|
||||
rip.scaduto(t.scaduto());
|
||||
rip.esposto(t.esposto());
|
||||
rip.importo_in_lire(t.importo_lire());
|
||||
rip.importo_in_lire(t.importo_euro());
|
||||
rip.print_on(body);
|
||||
pr.setfooterline(j + 1, body.row(0));
|
||||
}
|
||||
@ -831,7 +831,7 @@ void TESSL_form::modify_picture(TForm_item& fi, TString_array& op, const bool in
|
||||
void TESSL_form::print_total(int riga, const THash_object& o)
|
||||
{
|
||||
const short MAXID = 5;
|
||||
const short f_id[MAXID] = { PEC_TSALDO, PEC_TSCADUTO, PEC_TESPOSTO, PEC_TIMPLIRE, PEC_TUNASSIGNED };
|
||||
const short f_id[MAXID] = { PEC_TSALDO, PEC_TSCADUTO, PEC_TESPOSTO, PEC_TIMPEURO, PEC_TUNASSIGNED };
|
||||
TString_array prompt(MAXID);
|
||||
|
||||
TPrint_section& foot = section('F');
|
||||
@ -914,17 +914,17 @@ void TESSL_form::print_total(int riga, const THash_object& o)
|
||||
//modify_picture(esposto,old_pictures,in_valuta);
|
||||
esposto.set(t.esposto().string());
|
||||
|
||||
TForm_item& implire = foot.find_field(PEC_IMPLIRE);
|
||||
TForm_item& implire = foot.find_field(PEC_IMPEURO);
|
||||
if (implire.x() <= 0)
|
||||
{
|
||||
TForm_item& bimplire = body.find_field(PEC_IMPLIRE);
|
||||
TForm_item& bimplire = body.find_field(PEC_IMPEURO);
|
||||
implire.set_x(bimplire.x());
|
||||
implire.width() = bimplire.width();
|
||||
if (bimplire.shown()) implire.show();
|
||||
else implire.hide();
|
||||
}
|
||||
//modify_picture(implire,old_pictures,FALSE);
|
||||
implire.set(t.importo_lire().string());
|
||||
implire.set(t.importo_euro().string());
|
||||
|
||||
TForm_item& unreferenced = foot.find_field(PEC_UNASSIGNED);
|
||||
if (unreferenced.x() <= 0)
|
||||
|
||||
@ -20,16 +20,16 @@ MENU BAR_ITEM(1)
|
||||
ITEM MENU_ITEM(15) "Imposta formato ~numeri"
|
||||
ITEM MENU_ITEM(16) "Imposta formato ~date"
|
||||
|
||||
MENU BAR_ITEM(2)
|
||||
MENU BAR_ITEM(2)
|
||||
ITEM MENU_ITEM(21) "~Normale"
|
||||
|
||||
MENU BAR_ITEM(3)
|
||||
MENU BAR_ITEM(3)
|
||||
ITEM MENU_ITEM(31) "~Normale"
|
||||
|
||||
MENU BAR_ITEM(4)
|
||||
MENU BAR_ITEM(4)
|
||||
ITEM MENU_ITEM(41) "~Normale"
|
||||
|
||||
MENU BAR_ITEM(5)
|
||||
MENU BAR_ITEM(5)
|
||||
ITEM MENU_ITEM(51) "~Normale"
|
||||
|
||||
|
||||
|
||||
@ -459,7 +459,8 @@ void TMotore_application::ini2mask(TConfig& ini, TMask& msk, bool query)
|
||||
// l'autoload ??
|
||||
f.insert(-1, FALSE);
|
||||
// Aggiunge la riga allo sheet
|
||||
((TDocumento_mask &) msk).autoload(f.items());
|
||||
// ((TDocumento_mask &) msk).autoload(f.items()); // Cagata tremenda: non capisco
|
||||
rec.autoload(f);
|
||||
f.check_row(f.items()-1, 0x2);
|
||||
}
|
||||
}
|
||||
|
||||
@ -681,12 +681,13 @@ public:
|
||||
char tipocf() const {return *(const char *) (*_tipocf);}
|
||||
long codcf() const {return (long) *_codcf;}
|
||||
const char * cod_occas() const { return (const char *) *_cod_occas; }
|
||||
|
||||
static void set_key(TRectype& rec, char provv, int anno, const char* codnum, long numdoc);
|
||||
static void copy_data(TRectype& dst, const TRectype& src);
|
||||
static void copy_data(TRiga_documento& dst, const TRiga_documento& src);
|
||||
void copy_contents(const TDocumento & src);
|
||||
|
||||
void set_fields(TAuto_variable_rectype & rec);
|
||||
|
||||
void set_riga_esenzione();
|
||||
|
||||
void iva_esente(TString & codiva_es) const;
|
||||
|
||||
@ -873,13 +873,20 @@ void TDocumento::copy_data(TRectype& dst, const TRectype& src)
|
||||
dst.put(RDOC_NRIGA, nriga);
|
||||
dst.put(RDOC_IDRIGA, idriga);
|
||||
dst.zero(RDOC_MOVMAG);
|
||||
TString memo(1024);
|
||||
memo = src.get(RDOC_DESCEST);
|
||||
const TString memo = src.get(RDOC_DESCEST);
|
||||
dst.put(RDOC_DESCEST, memo);
|
||||
}
|
||||
else
|
||||
dst.zero(DOC_MOVMAG);
|
||||
}
|
||||
|
||||
// Funzione statica utile a tutti gli utenti di LF_RIGHEDOC
|
||||
void TDocumento::copy_data(TRiga_documento& dst, const TRiga_documento& src)
|
||||
{
|
||||
copy_data((TRectype&)dst, (const TRectype&)src);
|
||||
dst.put(RDOC_CODCMS, src.codice_commessa());
|
||||
dst.put(RDOC_FASCMS, src.fase_commessa());
|
||||
}
|
||||
|
||||
void TDocumento::copy_contents(const TDocumento& src)
|
||||
{
|
||||
|
||||
@ -296,7 +296,7 @@ void TTipo_documento::read_formule()
|
||||
}
|
||||
_totale_cont = prof.get("TOTALECONT", "MAIN");
|
||||
_cnt_prezzi = prof.get_bool("CONTROLLO_PREZZI");
|
||||
_field_prezzo = prof.get(RDOC_PREZZO, "MAIN", -1, RDOC_PREZZO);
|
||||
_field_prezzo = prof.get(RDOC_PREZZO, "MAIN");
|
||||
_field_qta = prof.get(RDOC_QTA, "MAIN", -1, RDOC_QTA);
|
||||
_field_qtaevasa = prof.get(RDOC_QTAEVASA, "MAIN", -1, RDOC_QTAEVASA);
|
||||
|
||||
|
||||
@ -2770,7 +2770,7 @@ error_type TContabilizzazione::write_intra(TDocumento& doc)
|
||||
rc->put("MASSAUMS", massaums);
|
||||
rc->put("VALSTAT", valstat);
|
||||
|
||||
totale_righe += is_val ? imp_val.get_num() : imp.get_num();
|
||||
totale_righe += imp.get_num(); // Il totale delle righe in Euro!
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1518,7 +1518,8 @@ bool TElabora_mask::on_field_event(TOperable_field& o, TField_event e, long joll
|
||||
set(F_TYPE, "");
|
||||
}
|
||||
update_ndoc_filter(TRUE);
|
||||
o.mask().field(F_NDOC_ELAB).check_type(o.get() == "" ? CHECK_SEARCH : CHECK_REQUIRED);
|
||||
const bool is_search = o.get().empty() || field(F_CODCF_ELAB).empty();
|
||||
o.mask().field(F_NDOC_ELAB).check_type(is_search ? CHECK_SEARCH : CHECK_REQUIRED);
|
||||
}
|
||||
break;
|
||||
case F_STATODOC_ELAB:
|
||||
@ -1540,11 +1541,25 @@ bool TElabora_mask::on_field_event(TOperable_field& o, TField_event e, long joll
|
||||
case F_NDOC_ELAB:
|
||||
if ((e == fe_modify || e == fe_close) && o.check_type() == CHECK_SEARCH && !o.empty())
|
||||
{
|
||||
/* Metodo inaffidabile in assenza di codice clifo
|
||||
o.check_type(CHECK_REQUIRED);
|
||||
const bool ok = o.on_key (K_ENTER);
|
||||
|
||||
o.check_type(CHECK_SEARCH);
|
||||
return ok;
|
||||
*/
|
||||
TToken_string key;
|
||||
key.add("D"); key.add(get(F_ANNO_ELAB));
|
||||
key.add(get(F_CODNUM_ELAB)); key.add(o.get());
|
||||
const TRectype& rec = cache().get(LF_DOC, key);
|
||||
bool ok = !rec.empty(); // Verifica esistenza documento
|
||||
if (ok)
|
||||
{
|
||||
TCursor* c = _tree.get_cursor();
|
||||
c->curr() = rec;
|
||||
ok = c->test(_isequal) == NOERR; // Verifica compatibilità documento
|
||||
}
|
||||
if (!ok)
|
||||
return error_box(((TEdit_field&)o).get_warning());
|
||||
}
|
||||
break;
|
||||
case F_ROWS:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user