Patch level : 10.0 549
Files correlati : Ricompilazione Demo : [ ] Corretta keyword nextcons nella stampa giri git-svn-id: svn://10.65.10.50/trunk@19774 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
70d62e8472
commit
0411450568
@ -1,32 +1,6 @@
|
|||||||
#include <applicat.h>
|
#include <applicat.h>
|
||||||
#include <reprint.h>
|
#include <reprint.h>
|
||||||
|
#include "lvlib.h"
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
class TStampa_tabelle_lv : public TSkeleton_application
|
class TStampa_tabelle_lv : public TSkeleton_application
|
||||||
{
|
{
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#include <reprint.h>
|
#include <reprint.h>
|
||||||
#include <textset.h>
|
#include <textset.h>
|
||||||
|
|
||||||
|
#include "lvlib.h"
|
||||||
#include "lv2300a.h"
|
#include "lv2300a.h"
|
||||||
|
|
||||||
class TGiri_recordset: public TCSV_recordset
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
class TGiri_report : public TReport
|
class TGiri_report : public TReport_lv
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
virtual bool use_mask() { return false; }
|
virtual bool use_mask() { return false; }
|
||||||
|
21
lv/lvlib.cpp
21
lv/lvlib.cpp
@ -1509,3 +1509,24 @@ TGiac_per_cli::TGiac_per_cli()
|
|||||||
_year = 0;
|
_year = 0;
|
||||||
_indsped = 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);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -5,6 +5,10 @@
|
|||||||
#include <recset.h>
|
#include <recset.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __REPORT_H
|
||||||
|
#include <report.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __MGLIB_H
|
#ifndef __MGLIB_H
|
||||||
#include "../mg/mglib.h"
|
#include "../mg/mglib.h"
|
||||||
#endif
|
#endif
|
||||||
@ -355,5 +359,10 @@ public:
|
|||||||
TGiac_per_cli(); //costruttore
|
TGiac_per_cli(); //costruttore
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class TReport_lv : public TReport
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
virtual bool get_usr_val(const TString& name, TVariant& var) const;
|
||||||
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user