Modificato browse scelta ditte come richiesto da Milano
git-svn-id: svn://10.65.10.50/trunk@1948 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
0c3be56d04
commit
c607855533
124
cg/cg4800.cpp
124
cg/cg4800.cpp
@ -94,8 +94,6 @@ bool VersAcc_app::create()
|
|||||||
{
|
{
|
||||||
TApplication::create();
|
TApplication::create();
|
||||||
|
|
||||||
TDate oggi(TODAY);
|
|
||||||
_year = oggi.year();
|
|
||||||
_nditte = new TRelation(LF_NDITTE);
|
_nditte = new TRelation(LF_NDITTE);
|
||||||
_nditte->add(LF_ANAG, "TIPOA=TIPOA|CODANAGR=CODANAGR");
|
_nditte->add(LF_ANAG, "TIPOA=TIPOA|CODANAGR=CODANAGR");
|
||||||
_nditte->add(LF_COMUNI, "COM=COMRF(COMRES)", 1, LF_ANAG);
|
_nditte->add(LF_COMUNI, "COM=COMRF(COMRES)", 1, LF_ANAG);
|
||||||
@ -113,6 +111,9 @@ bool VersAcc_app::create()
|
|||||||
_abips = c.get("CodABI");
|
_abips = c.get("CodABI");
|
||||||
_cabps = c.get("CodCAB");
|
_cabps = c.get("CodCAB");
|
||||||
|
|
||||||
|
TDate oggi(TODAY);
|
||||||
|
_year = oggi.year();
|
||||||
|
|
||||||
begin_wait();
|
begin_wait();
|
||||||
build_nomiditte();
|
build_nomiditte();
|
||||||
build_ditte_sheet();
|
build_ditte_sheet();
|
||||||
@ -141,6 +142,7 @@ bool VersAcc_app::ch_year_handler(TMask_field& f, KEY key)
|
|||||||
if (key == K_TAB && f.focusdirty())
|
if (key == K_TAB && f.focusdirty())
|
||||||
{
|
{
|
||||||
app().begin_wait();
|
app().begin_wait();
|
||||||
|
app()._year = atoi(f.get());
|
||||||
app().build_nomiditte();
|
app().build_nomiditte();
|
||||||
app().build_ditte_sheet();
|
app().build_ditte_sheet();
|
||||||
app().end_wait();
|
app().end_wait();
|
||||||
@ -208,8 +210,8 @@ bool VersAcc_app::menu(MENU_TAG)
|
|||||||
vers_acc();
|
vers_acc();
|
||||||
if (_print)
|
if (_print)
|
||||||
{
|
{
|
||||||
enable_menu_item(M_FILE_PRINT);
|
enable_menu_item(M_FILE_PRINT);
|
||||||
print();
|
print();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else warning_box("Nessuna ditta selezionata!");
|
else warning_box("Nessuna ditta selezionata!");
|
||||||
@ -237,20 +239,20 @@ bool VersAcc_app::check_acc()
|
|||||||
|
|
||||||
switch (k)
|
switch (k)
|
||||||
{
|
{
|
||||||
case DLG_SELECT:
|
case DLG_SELECT:
|
||||||
_ditte->run();
|
_ditte->run();
|
||||||
for (j = 0l; j < _ditte->items(); j++)
|
for (j = 0l; j < _ditte->items(); j++)
|
||||||
if (_ditte->checked(j)) _selected.set(j);
|
if (_ditte->checked(j)) _selected.set(j);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BUT_CGB_ALL:
|
case BUT_CGB_ALL:
|
||||||
_ditte->check(-1);
|
_ditte->check(-1);
|
||||||
for (j = 0l; j < _ditte->items(); j++)
|
for (j = 0l; j < _ditte->items(); j++)
|
||||||
if (_ditte->checked(j) && !_ditte->disabled(j))
|
if (_ditte->checked(j) && !_ditte->disabled(j))
|
||||||
_selected.set(j);
|
_selected.set(j);
|
||||||
_calcall = TRUE;
|
_calcall = TRUE;
|
||||||
k = K_ENTER;
|
k = K_ENTER;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -420,7 +422,7 @@ void VersAcc_app::lettura_delega()
|
|||||||
else //non esiste la delega
|
else //non esiste la delega
|
||||||
{
|
{
|
||||||
if (_diff >= ACCONTO_SENZA_CREDITO)
|
if (_diff >= ACCONTO_SENZA_CREDITO)
|
||||||
//creo record delega
|
//creo record delega
|
||||||
{
|
{
|
||||||
crea_delega();
|
crea_delega();
|
||||||
_da_stampare = TRUE;
|
_da_stampare = TRUE;
|
||||||
@ -508,25 +510,25 @@ bool VersAcc_app::video_conferma()
|
|||||||
|
|
||||||
switch(k)
|
switch(k)
|
||||||
{
|
{
|
||||||
case K_SAVE:
|
case K_SAVE:
|
||||||
{
|
{
|
||||||
KEY k = yesnocancel_box("Delega gia' stampata. Si desidera ugualmente confermare l'aggiornamento?");
|
KEY k = yesnocancel_box("Delega gia' stampata. Si desidera ugualmente confermare l'aggiornamento?");
|
||||||
if (k == K_YES)
|
if (k == K_YES)
|
||||||
{
|
{
|
||||||
_da_stampare = TRUE;
|
_da_stampare = TRUE;
|
||||||
_del->put("R0",_diff);
|
_del->put("R0",_diff);
|
||||||
_del->put("B0", "");
|
_del->put("B0", "");
|
||||||
_del->rewrite();
|
_del->rewrite();
|
||||||
}
|
}
|
||||||
if (k == K_YES || k == K_NO)
|
if (k == K_YES || k == K_NO)
|
||||||
stop = TRUE;
|
stop = TRUE;
|
||||||
}
|
|
||||||
break;
|
|
||||||
case K_ESC:
|
|
||||||
//case K_QUIT:
|
|
||||||
stop = TRUE;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
case K_ESC:
|
||||||
|
//case K_QUIT:
|
||||||
|
stop = TRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -540,37 +542,37 @@ void VersAcc_app::crea_riga_stampa(bool tipost)
|
|||||||
{
|
{
|
||||||
if (_con.not_empty())
|
if (_con.not_empty())
|
||||||
{
|
{
|
||||||
TTable ucc("%UCC");
|
TTable ucc("%UCC");
|
||||||
ucc.zero();
|
ucc.zero();
|
||||||
ucc.put("CODTAB", _con);
|
ucc.put("CODTAB", _con);
|
||||||
if (ucc.read() == NOERR)
|
if (ucc.read() == NOERR)
|
||||||
desc = ucc.get("S0");
|
desc = ucc.get("S0");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else //prendo la descrizione della banca
|
else //prendo la descrizione della banca
|
||||||
|
{
|
||||||
|
if (_abi.not_empty())
|
||||||
{
|
{
|
||||||
if (_abi.not_empty())
|
TTable ban("%BAN");
|
||||||
{
|
TString16 cod;
|
||||||
TTable ban("%BAN");
|
cod = _abi; cod << _cab;
|
||||||
TString16 cod;
|
ban.zero();
|
||||||
cod = _abi; cod << _cab;
|
ban.put("CODTAB", cod);
|
||||||
ban.zero();
|
if (ban.read() == NOERR)
|
||||||
ban.put("CODTAB", cod);
|
desc = ban.get("S0");
|
||||||
if (ban.read() == NOERR)
|
|
||||||
desc = ban.get("S0");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
tt->add(_nditte->lfile().get("CODDITTA"));
|
tt->add(_nditte->lfile().get("CODDITTA"));
|
||||||
tt->add(_nditte->lfile().get("RAGSOC"));
|
tt->add(_nditte->lfile().get("RAGSOC"));
|
||||||
tt->add(_diff.string());
|
tt->add(_diff.string());
|
||||||
tt->add(_abi);
|
tt->add(_abi);
|
||||||
tt->add(_cab);
|
tt->add(_cab);
|
||||||
tt->add(_con);
|
tt->add(_con);
|
||||||
tt->add(desc);
|
tt->add(desc);
|
||||||
tt->add(tipost);
|
tt->add(tipost);
|
||||||
|
|
||||||
if (tt != NULL) _desc.add(tt);
|
if (tt != NULL) _desc.add(tt);
|
||||||
}
|
}
|
||||||
|
|
||||||
int cg4800(int argc, char* argv[])
|
int cg4800(int argc, char* argv[])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user