Patch level :
Files correlati : Ricompilazione Demo : [ ] Commento : git-svn-id: svn://10.65.10.50/trunk@17020 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
84bb5b8319
commit
4e17d9ea6e
@ -1,4 +1,4 @@
|
||||
BUTTON DLG_ELABORA 2 2
|
||||
BUTTON DLG_OK 2 2
|
||||
BEGIN
|
||||
PROMPT 1 1 "Elabora"
|
||||
PICTURE BMP_ELABORA
|
||||
|
@ -181,6 +181,7 @@
|
||||
#define LF_LVPASPLAN 164
|
||||
#define LF_LVTIPISOSP 165
|
||||
#define LF_LVCONSPLAN 166
|
||||
#define LF_LVRCONSPLAN 167
|
||||
|
||||
#define LF_EXTERNAL 1000 // Files with id >= are considered to be externals
|
||||
|
||||
|
@ -16,6 +16,8 @@ UTULAGG|1|16|0|Utente che ha fatto l'ultimo aggiornamento
|
||||
DTULAGG|5|8|0|Data dell'ultimo aggiornamento
|
||||
ORULAGG|10|6|Ora dell'ultimo aggiornamento
|
||||
NOTE|11|10|0|Note
|
||||
1
|
||||
CODCF+CODCONT+CODITI+GGCONS|
|
||||
3
|
||||
CODCF+CODCONT+CODITI+GGCONS|
|
||||
GGCONS+CODITI+CODCF+CONCONT|
|
||||
GGCONS+CODCF+CONDCON+CODITI|X
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
166
|
||||
9
|
||||
CODPLAN|1|10|0|Codice del planning
|
||||
CODPLAN|3|6|0|Codice del planning
|
||||
DTCONS|5|8|0|Data consegna
|
||||
GGCONS|2|1|0|Giorno consegna
|
||||
CODAUT|1|2|0|Autista
|
||||
@ -9,5 +9,6 @@ CODITI|2|3|0|Codice itinerario
|
||||
UTULAGG|1|16|0|Utente che aggiornato per ultimo il planning
|
||||
DTULAGG|5|8|0|Data ultimo aggionamento del planning
|
||||
ORULAGG|10|6|0|Ora ultimo aggiornamento del planning
|
||||
1
|
||||
2
|
||||
CODPLAN|
|
||||
DTCONS+CODPLAN|X
|
@ -1,6 +1,6 @@
|
||||
167
|
||||
16
|
||||
CODPLAN|1|10|0|Codice planning
|
||||
CODPLAN|3|6|0|Codice planning
|
||||
CODRIGA|2|5|0|Codice ria
|
||||
MODPASS|1|1|0|Modalità di passaggio <C>onsegna <R>itiro <E>ntrambi
|
||||
DTCONS|5|8|0|Data di consegna
|
||||
|
@ -1,14 +1,10 @@
|
||||
#include <applicat.h>
|
||||
#include <automask.h>
|
||||
#include <progind.h>
|
||||
#include <recarray.h>
|
||||
#include <relation.h>
|
||||
#include <textset.h>
|
||||
|
||||
#include <mov.h>
|
||||
#include <rmoviva.h>
|
||||
|
||||
#include "../cg/cgsaldac.h"
|
||||
#include "../lv/lvconsplan.h"
|
||||
#include "../lv/lvrconsplan.h"
|
||||
#include "../lv/lvpasplan.h"
|
||||
|
||||
#include "lv2.h"
|
||||
#include "lv2100a.h"
|
||||
@ -57,21 +53,17 @@ class TGenera_planning_app : public TSkeleton_application
|
||||
|
||||
protected:
|
||||
virtual bool create();
|
||||
virtual bool destroy();
|
||||
virtual bool destroy();
|
||||
bool elimina_planning(const TDate& dadata, const TDate& adata) const;
|
||||
bool genera_codplan(long& key) const;
|
||||
|
||||
public:
|
||||
bool transfer();
|
||||
virtual void main_loop();
|
||||
/*void esporta_righe_iva(const TMask& msk) const;
|
||||
void set_inviva(TISAM_recordset& rmoviva) const;*/
|
||||
|
||||
virtual void main_loop();
|
||||
};
|
||||
|
||||
bool TGenera_planning_app::create()
|
||||
{
|
||||
/*xvt_fsys_removefile(nomeini);
|
||||
_configfile = new TConfig(nomeini);*/
|
||||
|
||||
_msk = new TGenera_planning_mask("lv2100a");
|
||||
|
||||
return TSkeleton_application::create();
|
||||
@ -80,12 +72,73 @@ bool TGenera_planning_app::create()
|
||||
bool TGenera_planning_app::destroy()
|
||||
{
|
||||
delete _msk;
|
||||
//delete _configfile;
|
||||
return TApplication::destroy();
|
||||
}
|
||||
|
||||
//funzione che controlla se il planning per una certa data esiste già
|
||||
/*bool TGenera_planning_app::elimina_planning(const TDate& dadata, const TDate& adata) const
|
||||
{
|
||||
long codplan = 0;
|
||||
|
||||
TRelation tplan(LF_LVCONSPLAN); //instanzio una relazione sul file LF_LVCONSPLAN
|
||||
TRelation rplan(LF_LVRCONSPLAN); //instanzio una relazione sul file LF_LVRCONSPLAN
|
||||
|
||||
for (TDate tmp = dadata; tmp <= adata; ++tmp)
|
||||
{
|
||||
TRectype& rec = tplan.curr(); //cerco se esiste la testata del planning
|
||||
rec.zero();
|
||||
rec.put(LVCONSPLAN_DTCONS,data);
|
||||
|
||||
TCursor cur(&tplan,"",2,&rec,&rec);
|
||||
const TRecnotype items = cur.items();
|
||||
if (items > 0)
|
||||
{
|
||||
cur.freeze();
|
||||
codplan = rec.get_long(LVCONSPLAN_CODPLAN);
|
||||
}
|
||||
|
||||
return found; //restituisco il codice del planning se esite già, altrimento rstituisco zero
|
||||
}*/
|
||||
|
||||
//funzione che genera il codplan (prende l'ultimo esistente e lo incrementa di uno)
|
||||
bool TGenera_planning_app::genera_codplan(long& key) const
|
||||
{
|
||||
long num = 1;
|
||||
TLocalisamfile tplan(LF_LVCONSPLAN);
|
||||
if (tplan.last() == NOERR)
|
||||
num += tplan.get_long(LVCONSPLAN_CODPLAN);
|
||||
key = num;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TGenera_planning_app::transfer()
|
||||
{
|
||||
const TDate dadata = _msk->get(F_DADATA);
|
||||
const TDate adata = _msk->get(F_ADATA);
|
||||
const TString8 codcf = _msk->get(F_CODCF);
|
||||
const TString8 coditi = _msk->get(F_CODITI);
|
||||
|
||||
TLocalisamfile tplan(LF_LVCONSPLAN);
|
||||
TLocalisamfile rplan(LF_LVRCONSPLAN);
|
||||
TLocalisamfile pplan(LF_LVPASPLAN);
|
||||
|
||||
for (TDate tmp = dadata; tmp <= adata; ++tmp)
|
||||
{
|
||||
//long codplan = cerca_planning(dadata,adata); //controllo se un planning per una certa data esiste già
|
||||
|
||||
/*if (!codplan)
|
||||
{*/
|
||||
long key;
|
||||
int giorno = tmp.wday();
|
||||
genera_codplan(key);
|
||||
long key1 = key;
|
||||
|
||||
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
void TGenera_planning_app::main_loop()
|
||||
|
@ -7,5 +7,5 @@
|
||||
#define F_ADATA 104
|
||||
#define F_CODITI 105
|
||||
#define F_DESCRITI 106
|
||||
#define F_CODCLI 107
|
||||
#define F_CODCF 107
|
||||
#define F_RAGSOCCLI 108
|
||||
|
@ -56,7 +56,6 @@ BEGIN
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT F_CODITI CODTAB
|
||||
OUTPUT F_DESCRITI S0
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
STRING F_DESCRITI 50
|
||||
@ -67,21 +66,19 @@ BEGIN
|
||||
DISPLAY "Descrizione@50" S0
|
||||
DISPLAY "Codice " CODTAB
|
||||
COPY OUTPUT F_CODITI
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
NUMBER F_CODCLI 6
|
||||
NUMBER F_CODCF 6
|
||||
BEGIN
|
||||
PROMPT 2 7 "Cliente "
|
||||
FLAGS "U"
|
||||
USE LF_CLIFO KEY 1
|
||||
INPUT TIPOCF "C"
|
||||
INPUT CODCF F_CODCLI
|
||||
INPUT CODCF F_CODCF
|
||||
DISPLAY "Codice " CODCF
|
||||
DISPLAY "Ragione sociale@50" RAGSOC
|
||||
OUTPUT F_CODCLI CODCF
|
||||
OUTPUT F_CODCF CODCF
|
||||
OUTPUT F_RAGSOCCLI RAGSOC
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
STRING F_RAGSOCCLI 50
|
||||
@ -92,8 +89,7 @@ BEGIN
|
||||
INPUT RAGSOC F_RAGSOCCLI
|
||||
DISPLAY "Ragione sociale@50" RAGSOC
|
||||
DISPLAY "Codice " CODCF
|
||||
COPY OUTPUT F_CODCLI
|
||||
CHECKTYPE NORMAL
|
||||
COPY OUTPUT F_CODCF
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
20
lv/lvpasplan.h
Executable file
20
lv/lvpasplan.h
Executable file
@ -0,0 +1,20 @@
|
||||
#ifndef __LVPASPLAN_H
|
||||
#define __LVPASPLAN_H
|
||||
|
||||
#define LVPASPLAN_CODCF "CODCF"
|
||||
#define LVPASPLAN_CODCONT "CODCONT"
|
||||
#define LVPASPLAN_CODITI "CODITI"
|
||||
#define LVPASPLAN_GGCONS "GGCONS"
|
||||
#define LVPASPLAN_ORDFERM "ORDFERM"
|
||||
#define LVPASPLAN_FREQ "FREQ"
|
||||
#define LVPASPLAN_MODPASS "MODPASS"
|
||||
#define LVPASPLAN_FLSTAG "FLSTAG"
|
||||
#define LVPASPLAN_ORARPRV "ORARPRV"
|
||||
#define LVPASPLAN_UTCREAZ "UTCREAZ"
|
||||
#define LVPASPLAN_DTCREAZ "DTCREAZ"
|
||||
#define LVPASPLAN_ORCREAZ "ORCREAZ"
|
||||
#define LVPASPLAN_UTULAGG "UTULAGG"
|
||||
#define LVPASPLAN_DTULAGG "DTULAGG"
|
||||
#define LVPASPLAN_ORULAGG "ORULAGG"
|
||||
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user