diff --git a/sc/sc0100a.uml b/sc/sc0100a.uml index 4082ed51f..9d6fb7504 100755 --- a/sc/sc0100a.uml +++ b/sc/sc0100a.uml @@ -1,6 +1,6 @@ #include "sc0100a.h" -TOOLBAR "" 0 19 0 3 +TOOLBAR "" 0 -3 0 3 BUTTON DLG_OK 10 2 BEGIN diff --git a/sc/sc0100p.uml b/sc/sc0100p.uml index e0b16149c..5360bca1d 100755 --- a/sc/sc0100p.uml +++ b/sc/sc0100p.uml @@ -1,6 +1,6 @@ #include "sc0100p.h" -TOOLBAR "" 0 20 0 2 +TOOLBAR "" 0 -3 0 3 BUTTON DLG_SAVEREC 10 2 BEGIN diff --git a/sc/sc2100.cpp b/sc/sc2100.cpp index 124bf22cc..5bb44d6a3 100755 --- a/sc/sc2100.cpp +++ b/sc/sc2100.cpp @@ -356,7 +356,11 @@ TImporto TEC_array::importo(const TPartita& game, const TRectype& pag, bool valu TImporto imp(sez, pag.get_real(field)); // Importo base if (!fat_val) + { imp.valore() += pag.get_real(PAGSCA_RITENUTE); // Sommo le ritenute se sono il lire + const TImporto ritsoc(sum.sezione_ritsoc(), pag.get_real(PAGSCA_RITSOC)); + imp += ritsoc; + } if (pag.get_char(PAGSCA_ACCSAL) == 'S') // Se il pagamento ha abbuoni o differenze cambio { diff --git a/sc/sc2401.cpp b/sc/sc2401.cpp index fb125cd44..2f2acf832 100755 --- a/sc/sc2401.cpp +++ b/sc/sc2401.cpp @@ -296,7 +296,11 @@ TImporto TESSL_array::importo(const TPartita& game, const TRectype& pag, bool va TImporto imp(sez, pag.get_real(field)); // Importo base if (!fat_val) + { imp.valore() += pag.get_real(PAGSCA_RITENUTE); // Sommo le ritenute se sono in lire + const TImporto ritsoc(sum.sezione_ritsoc(), pag.get_real(PAGSCA_RITSOC)); + imp += ritsoc; + } if (pag.get_char(PAGSCA_ACCSAL) == 'S') // Se il pagamento ha abbuoni o differenze cambio { diff --git a/sc/sc2500.cpp b/sc/sc2500.cpp index bbcebd5e2..f6a2c68f4 100755 --- a/sc/sc2500.cpp +++ b/sc/sc2500.cpp @@ -18,6 +18,7 @@ #include #include #include +#include /////////////////////////////////////////////////////////// // Maschera principale @@ -99,7 +100,7 @@ TImporto TConfronta_mask::importo_riga(const TRectype& riga) const if (riga.get_int(PART_TIPOMOV) > 1) // Non e' una fattura { const TString16 codval = riga.get(PART_CODVAL); - const bool in_valuta = codval.not_empty(); // Determina valuta + const bool in_valuta = is_true_value(codval); // Determina se in valuta real abb = riga.get_real(PART_ABBUONI); if (in_valuta) @@ -118,7 +119,18 @@ TImporto TConfronta_mask::importo_riga(const TRectype& riga) const i += diffcam; } else + { i.valore() += riga.get_real(PART_RITENUTE); + + const real ritsoc = riga.get_real(PART_RITSOC); + if (!ritsoc.is_zero()) + { + TString16 key; key << riga.get(PART_CODCAUS) << "|14"; // Riga ritenute sociali + const char sezcaus = cache().get(LF_RCAUSALI, key, RCA_SEZIONE)[0]; + const sezrs = sezcaus > ' ' ? (sezcaus == 'D' ? 'A' : 'D') : riga.get_char(PART_SEZ); + i += TImporto(sezrs, ritsoc); + } + } } return i; } @@ -398,13 +410,13 @@ public: void TConfronta_saldi::main_loop() { - open_files(LF_TAB, LF_TABCOM, LF_PCON, LF_CLIFO, LF_SALDI, LF_PARTITE, LF_RMOV, 0); + open_files(LF_TAB, LF_TABCOM, LF_PCON, LF_CLIFO, LF_SALDI, + LF_RCAUSALI, LF_PARTITE, LF_RMOV, 0); TConfronta_mask m; while (m.run() != K_QUIT); } int sc2500(int argc, char** argv) - { TConfronta_saldi app; app.run(argc, argv, TR("Stampa controllo saldi"));