MOdificata maschera per errori 346, 349, 352
git-svn-id: svn://10.65.10.50/trunk@285 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
b54fcc7c81
commit
5b8d614731
@ -2,27 +2,23 @@
|
||||
|
||||
MENU TASK_MENUBAR
|
||||
SUBMENU MENU_FILE "~File"
|
||||
ITEM BAR_ITEM(1) "~Modifica"
|
||||
|
||||
|
||||
|
||||
MENUBAR MENU_BAR(1)
|
||||
|
||||
MENU MENU_BAR(1)
|
||||
SUBMENU MENU_FILE "~File"
|
||||
ITEM BAR_ITEM(1) "~Modifica"
|
||||
|
||||
|
||||
MENUBAR MENU_BAR(2)
|
||||
|
||||
MENU MENU_BAR(2)
|
||||
SUBMENU MENU_FILE "~File"
|
||||
ITEM BAR_ITEM(1) "~Modifica"
|
||||
|
||||
MENUBAR MENU_BAR(3)
|
||||
|
||||
MENU MENU_BAR(3)
|
||||
SUBMENU MENU_FILE "~File"
|
||||
ITEM MENU_ITEM(3) "~Selezione"
|
||||
|
||||
/*
|
||||
* cg0 -4
|
||||
|
@ -22,7 +22,7 @@
|
||||
bool gest_vend()
|
||||
{
|
||||
TConfig c(CONFIG_DITTA,"cg");
|
||||
return (c.get("GesVen") == "X");
|
||||
return c.get("GesVen") == "X";
|
||||
}
|
||||
|
||||
class CG0200_application : public TRelation_application
|
||||
@ -40,8 +40,8 @@ class CG0200_application : public TRelation_application
|
||||
protected:
|
||||
bool user_create();
|
||||
bool user_destroy();
|
||||
virtual TMask* get_mask(int mode) {return _msk;}
|
||||
virtual bool changing_mask(int mode) {return FALSE;}
|
||||
virtual TMask* get_mask(int mode) { return _msk; }
|
||||
virtual bool changing_mask(int mode) { return FALSE; }
|
||||
virtual bool protected_record(TRectype &rec);
|
||||
virtual const char* get_next_key();
|
||||
void init_pages(TMask& m);
|
||||
|
@ -123,6 +123,7 @@
|
||||
#define F_CODVETT1 217
|
||||
#define F_CODVETT2 218
|
||||
#define F_CODVETT3 219
|
||||
#define F_RAGSOCALLEG 220
|
||||
|
||||
#define DLG_RIC 300
|
||||
#define DLG_CST 301
|
||||
|
@ -25,6 +25,14 @@ TMask* TPrimanota_application::load_mask(int n)
|
||||
if (_msk[n] != NULL)
|
||||
return _msk[n];
|
||||
|
||||
if (n == 1 || n == 2)
|
||||
for (int i = 1; i < 3; i++) // Try to save windows resources!
|
||||
if (_msk[i] != NULL)
|
||||
{
|
||||
delete _msk[i];
|
||||
_msk[i] = NULL;
|
||||
}
|
||||
|
||||
TFilename name("cg2100"); name << char(n == 3 ? 'o' : 'a'+n);
|
||||
TMask* m = new TMask(name);
|
||||
|
||||
@ -121,11 +129,10 @@ bool TPrimanota_application::user_create()
|
||||
_rel->lfile().last();
|
||||
_lastreg = _rel->lfile().get_long(MOV_NUMREG); // Init last registration number
|
||||
|
||||
set_search_field(F_NUMREG); // Set field for default search
|
||||
set_search_field(F_NUMREG); // Set field for default search
|
||||
|
||||
load_mask(0); // Try to reduce visible loading times
|
||||
load_mask(1);
|
||||
load_mask(2);
|
||||
load_mask(2); // Try to reduce visible loading times
|
||||
load_mask(0);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -201,8 +201,8 @@ NUMBER F_RIEPILOGO 5
|
||||
BEGIN
|
||||
PROMPT 51 9 "Riepilogo fino al n. "
|
||||
FIELD LF_MOV->UPROTIVA
|
||||
NUM_EXPR (#F_RIEPILOGO==0)||(#F_RIEPILOGO>=#F_PROTIVA)
|
||||
WARNING "Inserire un riepilogo non inferiore al protocollo IVA"
|
||||
NUM_EXPR ((#F_RIEPILOGO==0)||(#F_RIEPILOGO>=#F_PROTIVA))
|
||||
WARNING "Inserire un riepilogo non inferiore al protocollo IVA (Obbigatorio se il cliete/fornitore ha codice inserimento in allegati uguale a 3)"
|
||||
END
|
||||
|
||||
STRING F_CLIFO 1
|
||||
|
@ -134,7 +134,8 @@ int TPrimanota_application::type2pos(char tipo)
|
||||
for (int i = 0; i < cg.items(); i++)
|
||||
{
|
||||
TToken_string& s = cg.row(i);
|
||||
if (s[s.len()-1] == tipo)
|
||||
const int l = s.len()-1;
|
||||
if (l > 0 && s[l] == tipo)
|
||||
return i;
|
||||
}
|
||||
return -1;
|
||||
@ -147,7 +148,8 @@ int TPrimanota_application::bill2pos(const TBill& conto, char tipo)
|
||||
for (int i = 0; i < cg.items(); i++)
|
||||
{
|
||||
TToken_string& s = cg.row(i);
|
||||
if (s[s.len()-1] == tipo)
|
||||
const int l = s.len()-1;
|
||||
if (l > 0 && s[l] == tipo)
|
||||
{
|
||||
const TBill c(s, 3, 0x0);
|
||||
if (c == conto)
|
||||
@ -1026,7 +1028,7 @@ bool TPrimanota_application::clifo_handler(TMask_field& f, KEY key)
|
||||
app().add_cgs_tot(f.mask());
|
||||
TLocalisamfile clifo(LF_CLIFO);
|
||||
const int alleg = clifo.get_int("ALLEG");
|
||||
TEdit_field& upi = (TEdit_field&)f.mask().field(F_RIEPILOGO);
|
||||
TEdit_field& upi = f.mask().efield(F_RIEPILOGO);
|
||||
upi.check_type(alleg == 3 ? CHECK_REQUIRED : CHECK_NORMAL);
|
||||
}
|
||||
return TRUE;
|
||||
|
@ -13,13 +13,14 @@
|
||||
TString& add_plural(TString& s, long num, const char* name)
|
||||
{
|
||||
const TFixed_string n(name);
|
||||
const char last = *n.right(1);
|
||||
const char last = n[n.len()-1];
|
||||
|
||||
if (num < 1)
|
||||
{
|
||||
s << "nessun";
|
||||
if (strchr("aeiou", n[0]) == NULL)
|
||||
s << last;
|
||||
if (toupper(last) == 'A' || toupper(n[0]) == 'Z' ||
|
||||
toupper(n[0]) == 'S' && strchr("aeiouAEIOU", n[1]) == NULL)
|
||||
s << tolower(last);
|
||||
s << ' ' << name;
|
||||
}
|
||||
else
|
||||
@ -83,7 +84,7 @@ bool TDeleteprovv_app::menu(MENU_TAG)
|
||||
TString80 caption("Cancellazione di ");
|
||||
add_plural(caption, total, "movimento");
|
||||
|
||||
if (!yesno_box(caption))
|
||||
if (!yesno_box(caption) || total < 1)
|
||||
continue;
|
||||
|
||||
TProgind pi(total, caption, FALSE, TRUE, 24);
|
||||
@ -113,7 +114,9 @@ bool TDeleteprovv_app::menu(MENU_TAG)
|
||||
}
|
||||
|
||||
if (err == NOERR)
|
||||
err = mov.remove();
|
||||
{
|
||||
err = mov.remove(); // Isam bug on remove with key != 1
|
||||
}
|
||||
else
|
||||
caption = "testata";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user