git-svn-id: svn://10.65.10.50/branches/R_10_00@22877 c028cbd2-c16b-5b4b-a496-9718f37d4682

This commit is contained in:
guy 2013-07-02 15:10:33 +00:00
parent ecde331bed
commit 92268fcfd9
3 changed files with 17 additions and 7 deletions

View File

@ -56,6 +56,5 @@ int main(int argc,char** argv)
default:
break;
}
exit(0);
return 0;
}

View File

@ -37,7 +37,7 @@ const int ANNO_DIC = 2012;
class TRecord770;
class TTrasferimento770;
enum M770FieldType { AN, CF, CN, PI, DA, DT, NU, PN, PR, CB };
enum M770FieldType { AN, CF, CN, PI, DA, DT, NU, PN, PR, CB, VP, VN };
class TForm770 : public TForm
{
@ -166,6 +166,7 @@ public:
void set(int pos, bool val);
bool np_put(const char* code, const char* val);
bool np_put(const char* code, const real& val);
bool np_put(const char* code, long val);
const char* get(int pos, TString& str) const;
int get_int(int pos) const;
@ -298,7 +299,7 @@ void TForm770::transfer_section(TPrint_section& body, int rigo,
if (basecode.not_empty())
{
type = fi.get_special_desc("TRASFER");
if (!type.blank())
if (type.full())
{
if (type == "CB") // Casella Barrata
{
@ -310,7 +311,7 @@ void TForm770::transfer_section(TPrint_section& body, int rigo,
else
str.cut(0);
} else
if (type == "NP" || type == "NU") // Numero Positivo, NUmero
if (type == "NP" || type == "NU" || type == "VP" || type == "VN") // Numero Positivo, NUmero, Valuta positiva o libera
{
if (real::is_null(str))
str.cut(0);
@ -321,8 +322,12 @@ void TForm770::transfer_section(TPrint_section& body, int rigo,
{
real val = str;
if (_trc770.importi_in_centesimi())
{
val *= CENTO;
str = val.string(16, 0);
str = val.stringa(16, 0);
}
else
str = val.stringa(16, 2);
}
else
str.right_just(16);
@ -1132,9 +1137,15 @@ bool TRecord770::np_put(const char* code, const char* val)
return ok;
}
bool TRecord770::np_put(const char* code, long val)
{
TString16 str; str.format("%16ld", val);
return np_put(code, str);
}
bool TRecord770::np_put(const char* code, const real& val)
{
const TString& str = val.string(16, 0);
const TString& str = val.stringa(16, 2);
return np_put(code, str);
}

View File

@ -75,7 +75,7 @@ END
BOOLEAN F_CENT
BEGIN
PROMPT 1 9 "Salva importi in centesimi (default in Euro)"
PROMPT 1 9 "Salva importi in centesimi (x 100)"
END