Patch level : 10.0

Files correlati     : ve2.exe ve2500a.msk
Ricompilazione Demo : [ ]
Commento            :
Migliorata gestione listini


git-svn-id: svn://10.65.10.50/trunk@19489 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2009-10-21 15:05:22 +00:00
parent 083c6ec917
commit a6f421d6e1
6 changed files with 19 additions and 27 deletions

View File

@ -713,7 +713,7 @@ int TGestione_listini_semplice::rewrite(const TMask& m)
{ {
int err = TRelation_application::rewrite(m); int err = TRelation_application::rewrite(m);
if(err == NOERR) if (err == NOERR && m.curr_page() == 0) // Non salvo le righe stando a pagina 2!
save_rows(); save_rows();
return err; return err;

View File

@ -1,4 +1,5 @@
//maschera gestione listini comprensibile //maschera gestione listini comprensibile
#define F_L_TIPO 200
#define F_L_CATVEN 201 #define F_L_CATVEN 201
#define F_L_DESVEN 202 #define F_L_DESVEN 202
#define F_L_COD 203 #define F_L_COD 203

View File

@ -27,7 +27,7 @@ BEGIN
PROMPT 0 0 "@bDati Listino" PROMPT 0 0 "@bDati Listino"
END END
LIST DLG_NULL 1 7 LIST F_L_TIPO 1 7
BEGIN BEGIN
PROMPT 100 100 "" PROMPT 100 100 ""
ITEM "L|Listino" ITEM "L|Listino"
@ -70,7 +70,7 @@ BEGIN
KEY 1 KEY 1
USE LF_CONDV USE LF_CONDV
INPUT TIPO "L" INPUT TIPO "L"
INPUT CATVEN F_L_CATVEN SELECT INPUT CATVEN F_L_CATVEN
INPUT COD F_L_COD INPUT COD F_L_COD
DISPLAY "C.V." CATVEN DISPLAY "C.V." CATVEN
DISPLAY "Codice" COD DISPLAY "Codice" COD

View File

@ -1,4 +1,3 @@
#include <checks.h>
#include <xvt.h> #include <xvt.h>
#include "ve3.h" #include "ve3.h"
@ -6,17 +5,13 @@
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
const int r = (argc > 1) ? atoi(&argv[1][1]) : -1; const int r = (argc > 1) ? atoi(&argv[1][1]) : -1;
switch (r) switch (r)
{ {
case 0: ve3100(argc, argv); break; // stampa tabelle sconti (di riga/di documento/incondizionati) case 1: ve3200(argc, argv); break; // antichissima stampa listini/contratti/offerte
case 1: ve3200(argc, argv); break; // antichissima stampa testate listini/contratti/offerte case 2: ve3300(argc, argv); break; // antica stampa listini/contratti/offerte in modo sintetico & leggibile
case 2: ve3300(argc, argv); break; // antica stampa listini/contratti/offerte in modo sintetico & leggibile case 3: ve3400(argc, argv); break; // stampa anagrafica di magazzino
case 3: ve3400(argc, argv); break; // stampa anagrafica di magazzino case 4: ve3500(argc, argv); break; // moderna stampa condizioni di vendita
case 4: ve3500(argc, argv); break; // moderna stampa condizioni di vendita default: ve3100(argc, argv); break; // stampa tabelle sconti (di riga/di documento/incondizionati)
default:
error_box("Sintassi: %s -[0 [R|D|I] | 1 [L|C|O] | 2 [L|C|O] | 3 | 4 [L|C|O]]", argv[0]);
break;
} }
return 0; return 0;
} }

View File

@ -4,6 +4,7 @@
#include <defmask.h> #include <defmask.h>
#include <recset.h> #include <recset.h>
#include <reprint.h> #include <reprint.h>
#include <utility.h>
#include "ve3500a.h" #include "ve3500a.h"
@ -23,7 +24,10 @@ TPrint_condven_mask::TPrint_condven_mask() : TAutomask("ve3500a")
//legge il parametro con cui è stato chiamato il programma ('C'ontratti,'L'istini,'O'fferte.. //legge il parametro con cui è stato chiamato il programma ('C'ontratti,'L'istini,'O'fferte..
//..ed in base a questo setta il valore del campo F_TIPO sulla maschera che fa apparire/scomparire.. //..ed in base a questo setta il valore del campo F_TIPO sulla maschera che fa apparire/scomparire..
//..campi //..campi
const char* tipo = main_app().argv(2); const char* tipo = "L";
if (main_app().argc() > 2)
tipo = main_app().argv(2);
set(F_TIPO, tipo); set(F_TIPO, tipo);
if (tipo[0] == 'L') if (tipo[0] == 'L')
{ {
@ -100,15 +104,8 @@ void TPrint_condven::print_or_preview(const bool stampa)
{ {
if (_mask->check_fields()) if (_mask->check_fields())
{ {
TString rep_name; TString8 rep_name;
const char tipo = _mask->get(F_TIPO)[0]; rep_name << "ve3500" << _mask->get(F_TIPO);
switch (tipo)
{
case 'C': rep_name = "ve3500c.rep"; break;
case 'L': rep_name = "ve3500l.rep"; break;
case 'O': rep_name = "ve3500o.rep"; break;
default: break;
}
TPrint_condven_report rep; TPrint_condven_report rep;
rep.load(rep_name); rep.load(rep_name);
@ -142,8 +139,7 @@ void TPrint_condven::main_loop()
bool TPrint_condven::create() bool TPrint_condven::create()
{ {
//controlla che solo il producer AGA possa usare questo programma //controlla che solo il producer AGA possa usare questo programma
const int oem = ini_get_int(CONFIG_OEM, "MAIN", "OEM", -1); if (!is_power_reseller())
if (oem != 0)
{ {
error_box(TR("Programma non autorizzato!")); error_box(TR("Programma non autorizzato!"));
return false; return false;

View File

@ -54,7 +54,6 @@ STRING F_L_CATVEN 2
BEGIN BEGIN
PROMPT 1 3 "" PROMPT 1 3 ""
FLAGS "U" FLAGS "U"
KEY 1
USE CVE USE CVE
INPUT CODTAB F_L_CATVEN INPUT CODTAB F_L_CATVEN
DISPLAY "Cat." CODTAB DISPLAY "Cat." CODTAB
@ -139,7 +138,7 @@ BEGIN
FLAG "U" FLAG "U"
USE LF_CONDV USE LF_CONDV
INPUT TIPO F_TIPO SELECT INPUT TIPO F_TIPO SELECT
INPUT CATVEN F_L_CATVEN SELECT INPUT CATVEN F_L_CATVEN
INPUT COD F_L_COD INPUT COD F_L_COD
DISPLAY "C.V." CATVEN DISPLAY "C.V." CATVEN
DISPLAY "Codice" COD DISPLAY "Codice" COD
@ -150,6 +149,7 @@ BEGIN
OUTPUT F_DESCR DESCR OUTPUT F_DESCR DESCR
CHECKTYPE REQUIRED CHECKTYPE REQUIRED
GROUP 1 GROUP 1
ADD RUN ve2 -4
END END
TEXT DLG_NULL TEXT DLG_NULL