diff --git a/build/770.vcxproj b/build/770.vcxproj index be46eda94..f68783b1b 100644 --- a/build/770.vcxproj +++ b/build/770.vcxproj @@ -89,6 +89,7 @@ MachineX86 + false true @@ -307,6 +308,7 @@ + diff --git a/build/771mod.vcxproj b/build/771mod.vcxproj index a5c64a7b3..1e0554cc6 100644 --- a/build/771mod.vcxproj +++ b/build/771mod.vcxproj @@ -134,6 +134,7 @@ MachineX86 12.0 + false true diff --git a/build/772mod.vcxproj b/build/772mod.vcxproj index ae5b6eb92..5e12556c1 100644 --- a/build/772mod.vcxproj +++ b/build/772mod.vcxproj @@ -133,6 +133,7 @@ MachineX86 12.0 + false true diff --git a/build/773mod.vcxproj b/build/773mod.vcxproj index 4b7b6cde7..03e172d65 100644 --- a/build/773mod.vcxproj +++ b/build/773mod.vcxproj @@ -91,6 +91,7 @@ MachineX86 + false true diff --git a/build/774.vcxproj b/build/774.vcxproj index 67fbd7510..708143edb 100644 --- a/build/774.vcxproj +++ b/build/774.vcxproj @@ -91,6 +91,7 @@ MachineX86 12.0 + false true diff --git a/build/775.vcxproj b/build/775.vcxproj index 7706488a7..9c8dd9581 100644 --- a/build/775.vcxproj +++ b/build/775.vcxproj @@ -133,6 +133,7 @@ MachineX86 + false true diff --git a/build/776mod.vcxproj b/build/776mod.vcxproj index ae7eb34d9..2f18e5b32 100644 --- a/build/776mod.vcxproj +++ b/build/776mod.vcxproj @@ -90,6 +90,7 @@ MachineX86 + false true diff --git a/build/777.vcxproj b/build/777.vcxproj index 328380ee5..17f112f41 100644 --- a/build/777.vcxproj +++ b/build/777.vcxproj @@ -90,6 +90,7 @@ MachineX86 + false true diff --git a/src/m770/770100.cpp b/src/m770/770100.cpp index 5d659a010..b10aabfcc 100755 --- a/src/m770/770100.cpp +++ b/src/m770/770100.cpp @@ -362,10 +362,10 @@ bool TSchedaPercipienti::agg_pagamenti(const TRectype& sch, const TDate& pag_dal if (numreg <= 0) return false; -#ifdef DBG - if (numreg == 37788) - int cazzone = 1; -#endif + const TRectype & mov = cache().get(LF_MOV, numreg); + + if (mov.empty()) + return false; TPartite_array partarr; @@ -426,9 +426,20 @@ bool TSchedaPercipienti::agg_pagamenti(const TRectype& sch, const TDate& pag_dal for (int rowp = ratapart.last(); rowp > 0; rowp = ratapart.pred(rowp)) { - const TRectype& pag = ratapart.row(rowp); // Riga pagamento + const TRectype& pag = ratapart.row(rowp); // Riga pagamento + const TRectype& pagrow = p->riga(pag.get_long(PAGSCA_NRIGP)); + const long numregpag = pagrow.get_long(PART_NREG); + + if (numregpag > 0L) + { + const TRectype & movpag = cache().get(LF_MOV, numregpag); + + if (movpag.empty()) + return false; + } const TRiga_partite& sum = p->riga(rowp); // Riga partite - if (sum.tipo() == tm_nota_credito) + + if (sum.tipo() == tm_nota_credito) continue; if (pag_dal.ok()) // Filtro opzionale su data pagamento