diff --git a/m770/771.cpp b/m770/771.cpp index 7a1396397..d17c3370f 100755 --- a/m770/771.cpp +++ b/m770/771.cpp @@ -56,6 +56,5 @@ int main(int argc,char** argv) default: break; } - exit(0); return 0; } diff --git a/m770/777100.cpp b/m770/777100.cpp index b652ae398..6321a760a 100755 --- a/m770/777100.cpp +++ b/m770/777100.cpp @@ -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); } diff --git a/m770/777100a.uml b/m770/777100a.uml index 131e40709..414dcdd5c 100755 --- a/m770/777100a.uml +++ b/m770/777100a.uml @@ -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