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
|
BEGIN
|
||||||
PROMPT 1 1 "Elabora"
|
PROMPT 1 1 "Elabora"
|
||||||
PICTURE BMP_ELABORA
|
PICTURE BMP_ELABORA
|
||||||
|
@ -181,6 +181,7 @@
|
|||||||
#define LF_LVPASPLAN 164
|
#define LF_LVPASPLAN 164
|
||||||
#define LF_LVTIPISOSP 165
|
#define LF_LVTIPISOSP 165
|
||||||
#define LF_LVCONSPLAN 166
|
#define LF_LVCONSPLAN 166
|
||||||
|
#define LF_LVRCONSPLAN 167
|
||||||
|
|
||||||
#define LF_EXTERNAL 1000 // Files with id >= are considered to be externals
|
#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
|
DTULAGG|5|8|0|Data dell'ultimo aggiornamento
|
||||||
ORULAGG|10|6|Ora dell'ultimo aggiornamento
|
ORULAGG|10|6|Ora dell'ultimo aggiornamento
|
||||||
NOTE|11|10|0|Note
|
NOTE|11|10|0|Note
|
||||||
1
|
3
|
||||||
CODCF+CODCONT+CODITI+GGCONS|
|
CODCF+CODCONT+CODITI+GGCONS|
|
||||||
|
GGCONS+CODITI+CODCF+CONCONT|
|
||||||
|
GGCONS+CODCF+CONDCON+CODITI|X
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
166
|
166
|
||||||
9
|
9
|
||||||
CODPLAN|1|10|0|Codice del planning
|
CODPLAN|3|6|0|Codice del planning
|
||||||
DTCONS|5|8|0|Data consegna
|
DTCONS|5|8|0|Data consegna
|
||||||
GGCONS|2|1|0|Giorno consegna
|
GGCONS|2|1|0|Giorno consegna
|
||||||
CODAUT|1|2|0|Autista
|
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
|
UTULAGG|1|16|0|Utente che aggiornato per ultimo il planning
|
||||||
DTULAGG|5|8|0|Data ultimo aggionamento del planning
|
DTULAGG|5|8|0|Data ultimo aggionamento del planning
|
||||||
ORULAGG|10|6|0|Ora ultimo aggiornamento del planning
|
ORULAGG|10|6|0|Ora ultimo aggiornamento del planning
|
||||||
1
|
2
|
||||||
CODPLAN|
|
CODPLAN|
|
||||||
|
DTCONS+CODPLAN|X
|
@ -1,6 +1,6 @@
|
|||||||
167
|
167
|
||||||
16
|
16
|
||||||
CODPLAN|1|10|0|Codice planning
|
CODPLAN|3|6|0|Codice planning
|
||||||
CODRIGA|2|5|0|Codice ria
|
CODRIGA|2|5|0|Codice ria
|
||||||
MODPASS|1|1|0|Modalità di passaggio <C>onsegna <R>itiro <E>ntrambi
|
MODPASS|1|1|0|Modalità di passaggio <C>onsegna <R>itiro <E>ntrambi
|
||||||
DTCONS|5|8|0|Data di consegna
|
DTCONS|5|8|0|Data di consegna
|
||||||
|
@ -1,14 +1,10 @@
|
|||||||
#include <applicat.h>
|
#include <applicat.h>
|
||||||
#include <automask.h>
|
#include <automask.h>
|
||||||
#include <progind.h>
|
|
||||||
#include <recarray.h>
|
|
||||||
#include <relation.h>
|
#include <relation.h>
|
||||||
#include <textset.h>
|
|
||||||
|
|
||||||
#include <mov.h>
|
#include "../lv/lvconsplan.h"
|
||||||
#include <rmoviva.h>
|
#include "../lv/lvrconsplan.h"
|
||||||
|
#include "../lv/lvpasplan.h"
|
||||||
#include "../cg/cgsaldac.h"
|
|
||||||
|
|
||||||
#include "lv2.h"
|
#include "lv2.h"
|
||||||
#include "lv2100a.h"
|
#include "lv2100a.h"
|
||||||
@ -58,20 +54,16 @@ class TGenera_planning_app : public TSkeleton_application
|
|||||||
protected:
|
protected:
|
||||||
virtual bool create();
|
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:
|
public:
|
||||||
bool transfer();
|
bool transfer();
|
||||||
virtual void main_loop();
|
virtual void main_loop();
|
||||||
/*void esporta_righe_iva(const TMask& msk) const;
|
|
||||||
void set_inviva(TISAM_recordset& rmoviva) const;*/
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
bool TGenera_planning_app::create()
|
bool TGenera_planning_app::create()
|
||||||
{
|
{
|
||||||
/*xvt_fsys_removefile(nomeini);
|
|
||||||
_configfile = new TConfig(nomeini);*/
|
|
||||||
|
|
||||||
_msk = new TGenera_planning_mask("lv2100a");
|
_msk = new TGenera_planning_mask("lv2100a");
|
||||||
|
|
||||||
return TSkeleton_application::create();
|
return TSkeleton_application::create();
|
||||||
@ -80,12 +72,73 @@ bool TGenera_planning_app::create()
|
|||||||
bool TGenera_planning_app::destroy()
|
bool TGenera_planning_app::destroy()
|
||||||
{
|
{
|
||||||
delete _msk;
|
delete _msk;
|
||||||
//delete _configfile;
|
|
||||||
return TApplication::destroy();
|
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()
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
void TGenera_planning_app::main_loop()
|
void TGenera_planning_app::main_loop()
|
||||||
|
@ -7,5 +7,5 @@
|
|||||||
#define F_ADATA 104
|
#define F_ADATA 104
|
||||||
#define F_CODITI 105
|
#define F_CODITI 105
|
||||||
#define F_DESCRITI 106
|
#define F_DESCRITI 106
|
||||||
#define F_CODCLI 107
|
#define F_CODCF 107
|
||||||
#define F_RAGSOCCLI 108
|
#define F_RAGSOCCLI 108
|
||||||
|
@ -56,7 +56,6 @@ BEGIN
|
|||||||
DISPLAY "Descrizione@50" S0
|
DISPLAY "Descrizione@50" S0
|
||||||
OUTPUT F_CODITI CODTAB
|
OUTPUT F_CODITI CODTAB
|
||||||
OUTPUT F_DESCRITI S0
|
OUTPUT F_DESCRITI S0
|
||||||
CHECKTYPE NORMAL
|
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING F_DESCRITI 50
|
STRING F_DESCRITI 50
|
||||||
@ -67,21 +66,19 @@ BEGIN
|
|||||||
DISPLAY "Descrizione@50" S0
|
DISPLAY "Descrizione@50" S0
|
||||||
DISPLAY "Codice " CODTAB
|
DISPLAY "Codice " CODTAB
|
||||||
COPY OUTPUT F_CODITI
|
COPY OUTPUT F_CODITI
|
||||||
CHECKTYPE NORMAL
|
|
||||||
END
|
END
|
||||||
|
|
||||||
NUMBER F_CODCLI 6
|
NUMBER F_CODCF 6
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 7 "Cliente "
|
PROMPT 2 7 "Cliente "
|
||||||
FLAGS "U"
|
FLAGS "U"
|
||||||
USE LF_CLIFO KEY 1
|
USE LF_CLIFO KEY 1
|
||||||
INPUT TIPOCF "C"
|
INPUT TIPOCF "C"
|
||||||
INPUT CODCF F_CODCLI
|
INPUT CODCF F_CODCF
|
||||||
DISPLAY "Codice " CODCF
|
DISPLAY "Codice " CODCF
|
||||||
DISPLAY "Ragione sociale@50" RAGSOC
|
DISPLAY "Ragione sociale@50" RAGSOC
|
||||||
OUTPUT F_CODCLI CODCF
|
OUTPUT F_CODCF CODCF
|
||||||
OUTPUT F_RAGSOCCLI RAGSOC
|
OUTPUT F_RAGSOCCLI RAGSOC
|
||||||
CHECKTYPE NORMAL
|
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING F_RAGSOCCLI 50
|
STRING F_RAGSOCCLI 50
|
||||||
@ -92,8 +89,7 @@ BEGIN
|
|||||||
INPUT RAGSOC F_RAGSOCCLI
|
INPUT RAGSOC F_RAGSOCCLI
|
||||||
DISPLAY "Ragione sociale@50" RAGSOC
|
DISPLAY "Ragione sociale@50" RAGSOC
|
||||||
DISPLAY "Codice " CODCF
|
DISPLAY "Codice " CODCF
|
||||||
COPY OUTPUT F_CODCLI
|
COPY OUTPUT F_CODCF
|
||||||
CHECKTYPE NORMAL
|
|
||||||
END
|
END
|
||||||
|
|
||||||
ENDPAGE
|
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