diff --git a/lv/lv0200.cpp b/lv/lv0200.cpp index 5988293d5..6a1da5cea 100755 --- a/lv/lv0200.cpp +++ b/lv/lv0200.cpp @@ -1,32 +1,6 @@ #include #include - -class TReport_lv : public TReport -{ -protected: - virtual bool get_usr_val(const TString& name, TVariant& var) const; -}; - -bool TReport_lv::get_usr_val(const TString& name, TVariant& var) const -{ - if (name == "#NEXTCONS") - { - TRecordset& recset = *recordset(); - const long clifo = recset.get("CODCF").as_int(); - const long contr = recset.get("CODCONT").as_int(); - const TDate dtcons = recset.get("DTCONS").as_date(); - if (clifo > 0 && contr > 0 && dtcons.ok()) - { - // Scrivere qui il calcolo della prossima data di consegna ... - // ... al momento non sono capace di farlo! - TDate next_dtcons = dtcons; - next_dtcons += 7; - var = next_dtcons; - return true; - } - } - return TReport::get_usr_val(name, var); -} +#include "lvlib.h" class TStampa_tabelle_lv : public TSkeleton_application { diff --git a/lv/lv2300.cpp b/lv/lv2300.cpp index aa32d969e..7e03323a2 100755 --- a/lv/lv2300.cpp +++ b/lv/lv2300.cpp @@ -3,6 +3,7 @@ #include #include +#include "lvlib.h" #include "lv2300a.h" class TGiri_recordset: public TCSV_recordset @@ -174,7 +175,7 @@ bool TGiri_mask::on_field_event(TOperable_field& o, TField_event e, long jolly) return true; } -class TGiri_report : public TReport +class TGiri_report : public TReport_lv { protected: virtual bool use_mask() { return false; } diff --git a/lv/lvlib.cpp b/lv/lvlib.cpp index ed7a534c1..d8672fc46 100755 --- a/lv/lvlib.cpp +++ b/lv/lvlib.cpp @@ -1509,3 +1509,24 @@ TGiac_per_cli::TGiac_per_cli() _year = 0; _indsped = 0; } +bool TReport_lv::get_usr_val(const TString& name, TVariant& var) const +{ + if (name == "#NEXTCONS") + { + TRecordset& recset = *recordset(); + const long clifo = recset.get("CODCF").as_int(); + const long contr = recset.get("CODCONT").as_int(); + const TDate dtcons = recset.get("DTCONS").as_date(); + if (clifo > 0 && contr > 0 && dtcons.ok()) + { + // Scrivere qui il calcolo della prossima data di consegna ... + // ... al momento non sono capace di farlo! + TDate next_dtcons = dtcons; + next_dtcons += 7; + var = next_dtcons; + return true; + } + } + return TReport::get_usr_val(name, var); +} + diff --git a/lv/lvlib.h b/lv/lvlib.h index 4b65d4cd9..9ae44a416 100755 --- a/lv/lvlib.h +++ b/lv/lvlib.h @@ -5,6 +5,10 @@ #include #endif +#ifndef __REPORT_H +#include +#endif + #ifndef __MGLIB_H #include "../mg/mglib.h" #endif @@ -355,5 +359,10 @@ public: TGiac_per_cli(); //costruttore }; +class TReport_lv : public TReport +{ +protected: + virtual bool get_usr_val(const TString& name, TVariant& var) const; +}; #endif