Patch level :10.0
Files correlati : Ricompilazione Demo : [ ] Commento : prima stesura programma modelassistance git-svn-id: svn://10.65.10.50/trunk@20662 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
7a5fc7d5bf
commit
a1405c1783
@ -1,6 +1,9 @@
|
|||||||
|
- PF --------------------------------------------------------------------------------------------------------------
|
||||||
PF0001
|
PF0001
|
||||||
Stampa etichette Fiorito
|
Stampa etichette Fiorito
|
||||||
|
|
||||||
|
|
||||||
|
- PD --------------------------------------------------------------------------------------------------------------
|
||||||
PD0001
|
PD0001
|
||||||
Trasferimento ad AS400 Dolber (antico vesirio.exe)
|
Trasferimento ad AS400 Dolber (antico vesirio.exe)
|
||||||
|
|
||||||
@ -35,6 +38,8 @@ Esportazione clienti e indirizzi di spedizione Pharmatex (solo msk e rep)
|
|||||||
PD6342
|
PD6342
|
||||||
Stampa dei costi/ricavi analitici per anno riproporzionati per mese (Habilita)
|
Stampa dei costi/ricavi analitici per anno riproporzionati per mese (Habilita)
|
||||||
|
|
||||||
|
|
||||||
|
- PG -------------------------------------------------------------------------------------------------------------
|
||||||
PG0001
|
PG0001
|
||||||
Generazione documenti da paghe
|
Generazione documenti da paghe
|
||||||
Trasferimento Maestri a TeamSystem
|
Trasferimento Maestri a TeamSystem
|
||||||
@ -63,11 +68,20 @@ PG0388 De Cade' (Sicuri)
|
|||||||
Esportazione ordini
|
Esportazione ordini
|
||||||
Importazione bolle
|
Importazione bolle
|
||||||
|
|
||||||
|
|
||||||
|
- PL -------------------------------------------------------------------------------------------------------------
|
||||||
PL0001 (Silav)
|
PL0001 (Silav)
|
||||||
Personalizzazioni per lavanderini!
|
Personalizzazioni per lavanderini!
|
||||||
Diana2000
|
Diana2000
|
||||||
Fabris
|
Fabris
|
||||||
|
|
||||||
|
|
||||||
|
- PN -------------------------------------------------------------------------------------------------------------
|
||||||
|
PN0001
|
||||||
|
Importazione dati vendite al dettaglio
|
||||||
|
|
||||||
|
|
||||||
|
- PS -------------------------------------------------------------------------------------------------------------
|
||||||
PS0017
|
PS0017
|
||||||
Gestione Incassi/Pagamenti CRPA
|
Gestione Incassi/Pagamenti CRPA
|
||||||
|
|
||||||
@ -75,9 +89,6 @@ PS0430 Il Cigno
|
|||||||
Correlazioni articoli utenti
|
Correlazioni articoli utenti
|
||||||
Configurazione campi per utente
|
Configurazione campi per utente
|
||||||
|
|
||||||
PN0001
|
|
||||||
Importazione dati vendite al dettaglio
|
|
||||||
|
|
||||||
PS0077
|
PS0077
|
||||||
(ex ve7)
|
(ex ve7)
|
||||||
Trasferimento documenti Teamsystem (ex ve7100, Pedretti)
|
Trasferimento documenti Teamsystem (ex ve7100, Pedretti)
|
||||||
@ -142,6 +153,8 @@ Importazione listini dei gommari (prassiroma, ex ve7500)
|
|||||||
PS1104
|
PS1104
|
||||||
Importazione articoli da file .csv per ditta TENDER (pennari di prassiroma)
|
Importazione articoli da file .csv per ditta TENDER (pennari di prassiroma)
|
||||||
|
|
||||||
|
|
||||||
|
- PT -------------------------------------------------------------------------------------------------------------
|
||||||
PT0001
|
PT0001
|
||||||
Settaggio clienti non in allegato
|
Settaggio clienti non in allegato
|
||||||
|
|
||||||
|
15
ps/ps0330.cpp
Executable file
15
ps/ps0330.cpp
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#include <xvt.h>
|
||||||
|
|
||||||
|
#include "ps0330.h"
|
||||||
|
|
||||||
|
int main( int argc, char** argv )
|
||||||
|
{
|
||||||
|
const int r = (argc > 1) ? argv[1][1]-'0' : -1;
|
||||||
|
|
||||||
|
switch (r)
|
||||||
|
{
|
||||||
|
case 0: ps0330100(argc, argv); break; // listini per marca Model Assistence
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
1
ps/ps0330.h
Executable file
1
ps/ps0330.h
Executable file
@ -0,0 +1 @@
|
|||||||
|
int ps0330100(int, char**);
|
154
ps/ps0330100.cpp
Executable file
154
ps/ps0330100.cpp
Executable file
@ -0,0 +1,154 @@
|
|||||||
|
#include <applicat.h>
|
||||||
|
#include <automask.h>
|
||||||
|
#include <dongle.h>
|
||||||
|
#include <modaut.h>
|
||||||
|
#include <progind.h>
|
||||||
|
#include <reprint.h>
|
||||||
|
#include <reputils.h>
|
||||||
|
#include <utility.h>
|
||||||
|
|
||||||
|
#include "../mg/anamag.h"
|
||||||
|
|
||||||
|
#include "ps0330100a.h"
|
||||||
|
|
||||||
|
///////////////////////////////////////////////
|
||||||
|
// MASCHERA
|
||||||
|
///////////////////////////////////////////////
|
||||||
|
class TMultimarche_mask : public TAutomask
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
||||||
|
|
||||||
|
public:
|
||||||
|
TMultimarche_mask();
|
||||||
|
};
|
||||||
|
|
||||||
|
TMultimarche_mask::TMultimarche_mask() : TAutomask("ps0330100a")
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TMultimarche_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||||
|
{
|
||||||
|
/*switch(o.dlg())
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}*/
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////
|
||||||
|
// RECORDSET
|
||||||
|
///////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
///////////////////////////////////////////////
|
||||||
|
// REPORT
|
||||||
|
///////////////////////////////////////////////
|
||||||
|
//il report in questione ha la query inside..
|
||||||
|
//..e non necessita di altro che i FIELD #... dei campi della maschera per avere i valori..
|
||||||
|
//..delle set_var interne
|
||||||
|
class TMultimarche_report : public TReport
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
virtual bool use_mask() { return false; } //questo ci vuole perchè la maschera ha un nome != dai report
|
||||||
|
public:
|
||||||
|
TMultimarche_report() {}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
///////////////////////////////////////////////
|
||||||
|
// APPLICAZIONE
|
||||||
|
///////////////////////////////////////////////
|
||||||
|
class TMultimarche : public TSkeleton_application
|
||||||
|
{
|
||||||
|
TMultimarche_mask* _mask;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual bool check_autorization() const {return false;}
|
||||||
|
virtual const char * extra_modules() const {return "ve";}
|
||||||
|
virtual bool create();
|
||||||
|
virtual void main_loop();
|
||||||
|
|
||||||
|
public:
|
||||||
|
void elabora();
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
void TMultimarche::elabora()
|
||||||
|
{
|
||||||
|
TMultimarche_report rep;
|
||||||
|
if (rep.load(_mask->get(F_REPORT)))
|
||||||
|
{
|
||||||
|
TRecordset* recset = rep.recordset();
|
||||||
|
const long anno = _mask->get_int(F_ANNO);
|
||||||
|
|
||||||
|
//crea l'elenco delle marche
|
||||||
|
TString marche_query;
|
||||||
|
marche_query << "USE ANAMAG\nSELECT CODART?=\"???";
|
||||||
|
marche_query << "\nFROM CODART=#DAMARCA";
|
||||||
|
marche_query << "\nTO CODART=#AMARCA";
|
||||||
|
TISAM_recordset marche_recset(marche_query);
|
||||||
|
const TString& damarca = _mask->get(F_DAMARCA);
|
||||||
|
const TString& amarca = _mask->get(F_AMARCA);
|
||||||
|
marche_recset.set_var("#DAMARCA", damarca);
|
||||||
|
marche_recset.set_var("#AMARCA", amarca);
|
||||||
|
const long marche_items = marche_recset.items();
|
||||||
|
|
||||||
|
TProgind pi(marche_items, "Esportazione bovina in corso...", true, true);
|
||||||
|
|
||||||
|
for (bool ok = marche_recset.move_first(); ok; ok = marche_recset.move_next())
|
||||||
|
{
|
||||||
|
if (!pi.addstatus(1))
|
||||||
|
break;
|
||||||
|
|
||||||
|
const TString4 marca = marche_recset.get(ANAMAG_CODART).as_string();
|
||||||
|
recset->set_var("#MARCA", marca);
|
||||||
|
recset->set_var("#ANNO", anno);
|
||||||
|
const long items = recset->items();
|
||||||
|
if (items > 0)
|
||||||
|
{
|
||||||
|
TReport_book book;
|
||||||
|
book.add(rep);
|
||||||
|
TFilename fname = _mask->get(F_PATH_FILE);
|
||||||
|
TString4 str_anno;
|
||||||
|
str_anno << anno;
|
||||||
|
fname.add(str_anno);
|
||||||
|
fname << "_" << marca;
|
||||||
|
fname.ext("xls");
|
||||||
|
book.export_excel(fname, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TMultimarche::create()
|
||||||
|
{
|
||||||
|
//se non ha VE non può proseguire
|
||||||
|
if (!has_module(VEAUT))
|
||||||
|
return error_box(TR("Modulo non autorizzato"));
|
||||||
|
Tdninst dninst;
|
||||||
|
if (!dninst.can_I_run(true))
|
||||||
|
return error_box(TR("Programma non autorizzato!"));
|
||||||
|
return TSkeleton_application::create();
|
||||||
|
}
|
||||||
|
|
||||||
|
void TMultimarche::main_loop()
|
||||||
|
{
|
||||||
|
_mask = new TMultimarche_mask;
|
||||||
|
if (_mask->run() != K_QUIT)
|
||||||
|
elabora();
|
||||||
|
|
||||||
|
delete _mask;
|
||||||
|
_mask = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int ps0330100 (int argc, char **argv)
|
||||||
|
{
|
||||||
|
TMultimarche a;
|
||||||
|
a.run(argc,argv, TR("Rimanenze per marca"));
|
||||||
|
return true;
|
||||||
|
}
|
8
ps/ps0330100a.h
Executable file
8
ps/ps0330100a.h
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#define F_ANNO 101
|
||||||
|
#define F_DAMARCA 102
|
||||||
|
#define F_DAMARCA_D 103
|
||||||
|
#define F_AMARCA 104
|
||||||
|
#define F_AMARCA_D 105
|
||||||
|
#define F_REPORT 107
|
||||||
|
#define F_PATH_FILE 108
|
||||||
|
|
35
ps/ps0330100a.rep
Executable file
35
ps/ps0330100a.rep
Executable file
@ -0,0 +1,35 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<report name="ps0330100a" lpi="6" class="ps0330">
|
||||||
|
<description>rimanenze per marca</description>
|
||||||
|
<font face="Arial" size="8" />
|
||||||
|
<section type="Head" pattern="1" />
|
||||||
|
<section type="Head" level="1" pattern="1" />
|
||||||
|
<section type="Body" pattern="1" />
|
||||||
|
<section type="Body" level="1" pattern="1">
|
||||||
|
<field type="Stringa" width="10" pattern="1">
|
||||||
|
<source>CODART</source>
|
||||||
|
</field>
|
||||||
|
<field x="10.5" type="Stringa" width="50" pattern="1">
|
||||||
|
<source>ANAMAG.DESCR</source>
|
||||||
|
</field>
|
||||||
|
<field x="61" type="Stringa" width="2" pattern="1">
|
||||||
|
<source>UMART.UM</source>
|
||||||
|
</field>
|
||||||
|
<field x="64" type="Numero" align="right" width="10" pattern="1">
|
||||||
|
<source>GIAC</source>
|
||||||
|
</field>
|
||||||
|
<field x="75" type="Valuta" align="right" width="10" pattern="1" text="#########,@@">
|
||||||
|
<source>UMART.PREZZO</source>
|
||||||
|
</field>
|
||||||
|
</section>
|
||||||
|
<section type="Foot" pattern="1" />
|
||||||
|
<section type="Foot" level="1" pattern="1" />
|
||||||
|
<sql>USE 109 KEY 2
|
||||||
|
SELECT (CODART[1,3]=#MARCA)(CODART!=#MARCA)
|
||||||
|
BY ANAMAG.DESCR
|
||||||
|
JOIN ANAMAG INTO CODART=CODART
|
||||||
|
JOIN UMART INTO CODART=CODART NRIGA=1
|
||||||
|
FROM ANNOES=#ANNO
|
||||||
|
TO ANNOES=#ANNO
|
||||||
|
</sql>
|
||||||
|
</report>
|
96
ps/ps0330100a.uml
Executable file
96
ps/ps0330100a.uml
Executable file
@ -0,0 +1,96 @@
|
|||||||
|
#include "ps0330100a.h"
|
||||||
|
|
||||||
|
PAGE "Rimanenze per marca" -1 -1 78 10
|
||||||
|
|
||||||
|
NUMBER F_ANNO 4
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 1 "Anno "
|
||||||
|
CHECKTYPE REQUIRED
|
||||||
|
END
|
||||||
|
|
||||||
|
GROUPBOX DLG_NULL 76 4
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 2 "@bMarche"
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_DAMARCA 3
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 3 "Da "
|
||||||
|
USE LF_ANAMAG SELECT CODART?="???"
|
||||||
|
INPUT CODART[1,3] F_DAMARCA
|
||||||
|
DISPLAY "Marca" CODART[1,3]
|
||||||
|
DISPLAY "Descrizione@50" DESCR
|
||||||
|
OUTPUT F_DAMARCA CODART[1,3]
|
||||||
|
OUTPUT F_DAMARCA_D DESCR
|
||||||
|
CHECKTYPE SEARCH
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_DAMARCA_D 50
|
||||||
|
BEGIN
|
||||||
|
PROMPT 15 3 ""
|
||||||
|
USE LF_ANAMAG KEY 2 SELECT CODART?="???"
|
||||||
|
INPUT DESCR F_DAMARCA_D
|
||||||
|
DISPLAY "Descrizione@50" DESCR
|
||||||
|
DISPLAY "Marca" CODART[1,3]
|
||||||
|
COPY OUTPUT F_DAMARCA
|
||||||
|
CHECKTYPE SEARCH
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_AMARCA 3
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 4 "A "
|
||||||
|
COPY USE F_DAMARCA
|
||||||
|
INPUT CODART[1,3] F_AMARCA
|
||||||
|
COPY DISPLAY F_DAMARCA
|
||||||
|
OUTPUT F_AMARCA CODART[1,3]
|
||||||
|
OUTPUT F_AMARCA_D DESCR
|
||||||
|
CHECKTYPE SEARCH
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_AMARCA_D 50
|
||||||
|
BEGIN
|
||||||
|
PROMPT 15 4 ""
|
||||||
|
COPY USE F_DAMARCA_D
|
||||||
|
INPUT DESCR F_AMARCA_D
|
||||||
|
COPY DISPLAY F_DAMARCA_D
|
||||||
|
COPY OUTPUT F_AMARCA
|
||||||
|
CHECKTYPE SEARCH
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_REPORT 50
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 6 "Report "
|
||||||
|
RSELECT "ps0330"
|
||||||
|
CHECKTYPE REQUIRED
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING F_PATH_FILE 255 50
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 7 "Cartella dest. "
|
||||||
|
DSELECT
|
||||||
|
FLAGS "M"
|
||||||
|
CHECKTYPE REQUIRED
|
||||||
|
WARNING "Selezionare una cartella valida!"
|
||||||
|
END
|
||||||
|
|
||||||
|
STRING DLG_PROFILE 50
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 -1 "Profilo "
|
||||||
|
PSELECT
|
||||||
|
END
|
||||||
|
|
||||||
|
ENDPAGE
|
||||||
|
|
||||||
|
TOOLBAR "" 0 0 0 2
|
||||||
|
|
||||||
|
BUTTON DLG_OK 10 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 1 "~Mmmuuu!"
|
||||||
|
PICTURE TOOL_PACK2MAG
|
||||||
|
END
|
||||||
|
|
||||||
|
#include <helpbar.h>
|
||||||
|
|
||||||
|
ENDPAGE
|
||||||
|
|
||||||
|
ENDMASK
|
Loading…
x
Reference in New Issue
Block a user