Aggiunte alcune parentesi
git-svn-id: svn://10.65.10.50/trunk@206 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
8cc1ae282a
commit
2342287312
@ -1,15 +1,16 @@
|
||||
#include <relapp.h>
|
||||
#include <lffiles.h>
|
||||
#include <modaut.h>
|
||||
#include <utility.h>
|
||||
#include <validate.h>
|
||||
#include <msksheet.h>
|
||||
#include <config.h>
|
||||
#include <defmask.h>
|
||||
|
||||
#include <pconti.h>
|
||||
#include <clifo.h>
|
||||
#include <anagr.h>
|
||||
#include <anafis.h>
|
||||
#include <validate.h>
|
||||
#include <defmask.h>
|
||||
#include <msksheet.h>
|
||||
#include <config.h>
|
||||
|
||||
#include "cg0.h"
|
||||
#include "cg0200.h"
|
||||
#include "cg0201.h"
|
||||
@ -445,7 +446,7 @@ void CG0200_application::common_f(const TMask& m)
|
||||
rec.put("PFAX",row.get());
|
||||
rec.put("FAX",row.get());
|
||||
rec.put("IVARID",row.get());
|
||||
rec.put("CODIND",(long)(i+1));
|
||||
rec.put("CODIND",i+1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -456,6 +457,7 @@ bool CG0200_application::indsp_notify(int r, KEY key)
|
||||
switch (key)
|
||||
{
|
||||
case K_SPACE:
|
||||
{
|
||||
// Request to modify row #r
|
||||
// Disable field # 101 (CODIND) update # of row
|
||||
TMask& m = indsp.sheet_mask();
|
||||
@ -463,25 +465,26 @@ bool CG0200_application::indsp_notify(int r, KEY key)
|
||||
if (m.get_int(114)==0) // Is it a new row ?
|
||||
m.set(114,(long)(r+1));
|
||||
m.disable(114);
|
||||
break;
|
||||
case K_INS:
|
||||
// request to add the row #r
|
||||
// To avoid rewriting of existing record.
|
||||
if (indsp.items() >= 999)
|
||||
{
|
||||
error_box("Raggiunto il numero massimo degli indirizzi per questo C/F");
|
||||
return FALSE; // Refuse Permission
|
||||
} else
|
||||
// To avoid inserts in the middle of the sheet
|
||||
if (indsp.items()>r)
|
||||
{
|
||||
error_box("Si possono aggiungere indirizzi solo alla fine");
|
||||
return FALSE; //Refuse permission
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case K_INS:
|
||||
// request to add the row #r
|
||||
// To avoid rewriting of existing record.
|
||||
if (indsp.items() >= 999)
|
||||
{
|
||||
error_box("Raggiunto il numero massimo degli indirizzi per questo C/F");
|
||||
return FALSE; // Refuse Permission
|
||||
} else
|
||||
// To avoid inserts in the middle of the sheet
|
||||
if (indsp.items()>r)
|
||||
{
|
||||
error_box("Si possono aggiungere indirizzi solo alla fine");
|
||||
return FALSE; //Refuse permission
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -495,7 +495,7 @@ int TPrimanota_application::read(TMask& m)
|
||||
|
||||
TConto c; get_conto(r, c);
|
||||
if (c.ok())
|
||||
c.add_to(riga, -1, 0x7); // 105-110
|
||||
c.add_to(riga, 4, 0x7); // 105-110
|
||||
else
|
||||
riga.add(" | | | | | ");
|
||||
|
||||
|
@ -516,8 +516,8 @@ void TPrimanota_application::set_ivas_row(int nriga, const char* codiva, TConto&
|
||||
TToken_string& riga = ivas().row(nriga);
|
||||
riga = " "; // Importo
|
||||
riga.add (codiva); // codiva
|
||||
riga.add (" | | "); // Det - Imposta - C/R
|
||||
riga.add(tc.string(0x3)); // Conto
|
||||
riga.add (" | "); // Det - Imposta
|
||||
riga.add(tc.string(0x7)); // Conto
|
||||
riga.add(desc); // Descrizione
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include "cg4400.h"
|
||||
#include "cg4400a.h"
|
||||
|
||||
TFixed_string TMP (__tmp, MAXSTR);
|
||||
HIDDEN TString256 TMP;
|
||||
|
||||
HIDDEN CG4400_application * app() { return (CG4400_application*) MainApp(); }
|
||||
|
||||
@ -329,7 +329,7 @@ const char * CG4400_application::descr_doc(const char * tipo)
|
||||
else
|
||||
TMP = "";
|
||||
|
||||
return __tmp;
|
||||
return TMP;
|
||||
}
|
||||
|
||||
const char * CG4400_application::descr_iva(const char * cod)
|
||||
@ -344,7 +344,7 @@ const char * CG4400_application::descr_iva(const char * cod)
|
||||
else
|
||||
TMP = "";
|
||||
|
||||
return __tmp;
|
||||
return TMP;
|
||||
}
|
||||
|
||||
const char * CG4400_application::desc_attivita(const char * codatt)
|
||||
@ -357,7 +357,7 @@ const char * CG4400_application::desc_attivita(const char * codatt)
|
||||
TMP = attiv.get("S0");
|
||||
else
|
||||
TMP = "";
|
||||
return __tmp;
|
||||
return TMP;
|
||||
}
|
||||
|
||||
const char * CG4400_application::ricerca_cf(char tipocf, long codcf)
|
||||
@ -369,7 +369,7 @@ const char * CG4400_application::ricerca_cf(char tipocf, long codcf)
|
||||
TMP = _clifo->get(CLI_RAGSOC);
|
||||
else
|
||||
TMP = "";
|
||||
return __tmp;
|
||||
return TMP;
|
||||
}
|
||||
|
||||
const char * CG4400_application::ricerca_occ(const char * occ)
|
||||
@ -383,7 +383,7 @@ const char * CG4400_application::ricerca_occ(const char * occ)
|
||||
TMP = occas.get(OCC_RAGSOC);
|
||||
else
|
||||
TMP = "";
|
||||
return __tmp;
|
||||
return TMP;
|
||||
}
|
||||
|
||||
void CG4400_application::user_create()
|
||||
|
18
cg/conto.cpp
18
cg/conto.cpp
@ -45,7 +45,7 @@ TConto::TConto(TToken_string& s, int from, int mode)
|
||||
// Certified 100%
|
||||
TConto& TConto::set(int g, int c, long s, char t, const char* d)
|
||||
{
|
||||
_tipo = toupper(t);
|
||||
_tipo = (t > ' ') ? toupper(t) : ' ';
|
||||
_gruppo = g;
|
||||
_conto = c;
|
||||
_sottoconto = s;
|
||||
@ -56,7 +56,10 @@ TConto& TConto::set(int g, int c, long s, char t, const char* d)
|
||||
const TConto& TConto::add_to(TToken_string& ts, int from, int mode)
|
||||
{
|
||||
if (mode & 0x4)
|
||||
ts.add(_tipo_cr, from++);
|
||||
{
|
||||
const int cr = tipo_cr();
|
||||
ts.add(cr > 0 ? format("%d", cr) : "", from++);
|
||||
}
|
||||
if (mode & 0x1)
|
||||
ts.add(_tipo, from++);
|
||||
ts.add(_gruppo, from++);
|
||||
@ -118,8 +121,8 @@ const char* TConto::describe()
|
||||
}
|
||||
if (_tipo == ' ')
|
||||
{
|
||||
desc = pcon.get("DESCR");
|
||||
_tipo_cr = pcon.get_int("TIPOSPRIC");
|
||||
desc = pcon.get("DESCR");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -152,8 +155,8 @@ bool TConto::read(TRectype &r)
|
||||
if (err == NOERR)
|
||||
{
|
||||
r = pcon.curr();
|
||||
_descrizione = r.get("DESCR");
|
||||
_tipo_cr = r.get_int("TIPOSPRIC");
|
||||
_descrizione = r.get("DESCR");
|
||||
}
|
||||
else
|
||||
r.zero();
|
||||
@ -189,10 +192,13 @@ int TConto::tipo_cr()
|
||||
// Certified 99% (uses __tmp_string)
|
||||
const char* TConto::string(int mode)
|
||||
{
|
||||
TFixed_string s(&__tmp_string[128], 80);
|
||||
TFixed_string s(&__tmp_string[256], 80);
|
||||
s.cut(0);
|
||||
if (mode & 0x4)
|
||||
s << tipo_cr() << '|';
|
||||
{
|
||||
const int cr = tipo_cr();
|
||||
s << (cr > 0 ? format("%d", cr) : " ") << '|';
|
||||
}
|
||||
if (mode & 0x1)
|
||||
s << _tipo << '|';
|
||||
s << _gruppo << '|' << _conto << '|' << _sottoconto;
|
||||
|
Loading…
x
Reference in New Issue
Block a user