Patch level : 2.1 048
Files correlati : or1.exe Ricompilazione Demo : [ ] Commento : Bug 0000136 Implementare la gestione multilingua git-svn-id: svn://10.65.10.50/trunk@12090 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
a29e4b43d4
commit
26cff3b057
@ -1,10 +1,9 @@
|
|||||||
#include <xvt.h>
|
#include <xvt.h>
|
||||||
#include <checks.h>
|
#include <checks.h>
|
||||||
|
#include <diction.h>
|
||||||
|
|
||||||
#include "or1.h"
|
#include "or1.h"
|
||||||
|
|
||||||
const char* const usage = "Errore - uso : %s -{0|1|2}";
|
|
||||||
|
|
||||||
int main(int argc,char** argv)
|
int main(int argc,char** argv)
|
||||||
{
|
{
|
||||||
const int n = argc > 1 ? atoi(argv[1]+1) : -1;
|
const int n = argc > 1 ? atoi(argv[1]+1) : -1;
|
||||||
@ -18,7 +17,7 @@ int main(int argc,char** argv)
|
|||||||
case 2:
|
case 2:
|
||||||
or1300(argc,argv); break; // stampa statistiche sui tempi di consegna
|
or1300(argc,argv); break; // stampa statistiche sui tempi di consegna
|
||||||
default:
|
default:
|
||||||
error_box(usage, argv[0]);
|
error_box(TR("Errore - uso : %s -{0|1|2}"), argv[0]);
|
||||||
}
|
}
|
||||||
exit(0);
|
exit(0);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -570,14 +570,6 @@ void TStampa_ordini::show_body_field_for_clifo_agent(short id, bool on, int from
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* {
|
|
||||||
const short offset1 = 300;
|
|
||||||
TForm_subsection& ssec1 = (TForm_subsection&)_frm->find_field('B', odd_page, "RIGHEART"); // Sottosezione padre
|
|
||||||
TForm_string& fld1 = (TForm_string&)ssec1.printsection().find_field(id + offset1);
|
|
||||||
fld1.show(on);
|
|
||||||
fld1.width() = to - from;
|
|
||||||
} */
|
|
||||||
|
|
||||||
{
|
{
|
||||||
const short offset1 = 400;
|
const short offset1 = 400;
|
||||||
TString16 subsection;
|
TString16 subsection;
|
||||||
|
@ -1063,6 +1063,6 @@ void TStampa_ordini::main_loop()
|
|||||||
int or1100(int argc, char** argv)
|
int or1100(int argc, char** argv)
|
||||||
{
|
{
|
||||||
TStampa_ordini a;
|
TStampa_ordini a;
|
||||||
a.run(argc,argv,"Stampa ordini");
|
a.run(argc,argv,TR("Stampa ordini"));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,6 @@ class TStampa_dettaglio_articoli : public TSkeleton_application
|
|||||||
TString_array
|
TString_array
|
||||||
_from_giac, _to_giac;
|
_from_giac, _to_giac;
|
||||||
protected:
|
protected:
|
||||||
void open_files(int logicnum, ...);
|
|
||||||
virtual bool create();
|
virtual bool create();
|
||||||
virtual bool destroy();
|
virtual bool destroy();
|
||||||
virtual void main_loop();
|
virtual void main_loop();
|
||||||
@ -52,18 +51,6 @@ public:
|
|||||||
virtual ~TStampa_dettaglio_articoli() {};
|
virtual ~TStampa_dettaglio_articoli() {};
|
||||||
};
|
};
|
||||||
|
|
||||||
void TStampa_dettaglio_articoli::open_files(int logicnum, ...)
|
|
||||||
{
|
|
||||||
va_list marker;
|
|
||||||
va_start(marker, logicnum);
|
|
||||||
while (logicnum > 0)
|
|
||||||
{
|
|
||||||
CHECKD(_file.objptr(logicnum) == NULL, "File gia' aperto: ", logicnum);
|
|
||||||
_file.add(new TLocalisamfile(logicnum), logicnum);
|
|
||||||
logicnum = va_arg(marker, int);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool TStampa_dettaglio_articoli::create()
|
bool TStampa_dettaglio_articoli::create()
|
||||||
{
|
{
|
||||||
open_files(LF_UMART, LF_OCCAS, LF_CLIFO, LF_INDSP, LF_CFVEN, LF_TABCOM, LF_MAG, 0);
|
open_files(LF_UMART, LF_OCCAS, LF_CLIFO, LF_INDSP, LF_CFVEN, LF_TABCOM, LF_MAG, 0);
|
||||||
@ -351,7 +338,7 @@ void TStampa_dettaglio_articoli::main_loop()
|
|||||||
int or1200(int argc, char** argv)
|
int or1200(int argc, char** argv)
|
||||||
{
|
{
|
||||||
TStampa_dettaglio_articoli a;
|
TStampa_dettaglio_articoli a;
|
||||||
a.run(argc,argv,"Stampa disponibilita' articoli");
|
a.run(argc,argv,TR("Stampa disponibilita' articoli"));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,12 +25,12 @@ bool TStampa_statistiche_consegna::destroy()
|
|||||||
|
|
||||||
void TStampa_statistiche_consegna::main_loop()
|
void TStampa_statistiche_consegna::main_loop()
|
||||||
{
|
{
|
||||||
sorry_box("Programma non ancora implementato.");
|
sorry_box(TR("Programma non ancora implementato."));
|
||||||
}
|
}
|
||||||
|
|
||||||
int or1300(int argc, char** argv)
|
int or1300(int argc, char** argv)
|
||||||
{
|
{
|
||||||
TStampa_statistiche_consegna a;
|
TStampa_statistiche_consegna a;
|
||||||
a.run(argc,argv,"Stampa tempi di consegna");
|
a.run(argc,argv,TR("Stampa tempi di consegna"));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include <diction.h>
|
||||||
#include "orlib.h"
|
#include "orlib.h"
|
||||||
#include "or1100a.h"
|
#include "or1100a.h"
|
||||||
|
|
||||||
@ -67,9 +68,7 @@ bool TOrdine_form::validate(TForm_item &cf, TToken_string &s)
|
|||||||
{
|
{
|
||||||
if (strcmp(s.get(0), "_ORDINE") == 0)
|
if (strcmp(s.get(0), "_ORDINE") == 0)
|
||||||
{
|
{
|
||||||
// TLocalisamfile& doc = cf.form().cursor()->file(LF_DOC);
|
|
||||||
TDocumento& doc = (TDocumento&)cf.form().cursor()->curr(LF_DOC);
|
TDocumento& doc = (TDocumento&)cf.form().cursor()->curr(LF_DOC);
|
||||||
//TLocalisamfile& rdoc = cf.form().cursor()->file(LF_RIGHEDOC);
|
|
||||||
TRiga_documento& rdoc = (TRiga_documento&)cf.form().cursor()->curr(LF_RIGHEDOC);
|
TRiga_documento& rdoc = (TRiga_documento&)cf.form().cursor()->curr(LF_RIGHEDOC);
|
||||||
// Add custom messages here
|
// Add custom messages here
|
||||||
// All the following messages takes 1 parameter: the field number to set
|
// All the following messages takes 1 parameter: the field number to set
|
||||||
@ -112,9 +111,9 @@ bool TOrdine_form::validate(TForm_item &cf, TToken_string &s)
|
|||||||
codmag = rdoc.get(RDOC_CODMAG).left(3);
|
codmag = rdoc.get(RDOC_CODMAG).left(3);
|
||||||
coddep = rdoc.get(RDOC_CODMAG).right(2);
|
coddep = rdoc.get(RDOC_CODMAG).right(2);
|
||||||
if (_detail_mag && codmag.not_empty())
|
if (_detail_mag && codmag.not_empty())
|
||||||
codart << " Mag. " << codmag;
|
codart << TR(" Mag. ") << codmag;
|
||||||
if (_detail_dep && coddep.not_empty())
|
if (_detail_dep && coddep.not_empty())
|
||||||
codart << " Dep. " << coddep;
|
codart << TR(" Dep. ") << coddep;
|
||||||
|
|
||||||
cf.set(codart);
|
cf.set(codart);
|
||||||
}
|
}
|
||||||
@ -138,11 +137,6 @@ bool TOrdine_form::validate(TForm_item &cf, TToken_string &s)
|
|||||||
real qtare(qr.get());
|
real qtare(qr.get());
|
||||||
|
|
||||||
// Converte i totali q.ta evasa e ordinata nella unita' di misura principale
|
// Converte i totali q.ta evasa e ordinata nella unita' di misura principale
|
||||||
// const int index_um = _art_giac->find_um(cur_um);
|
|
||||||
// const real fc = _art_giac->um().row(index_um > 0 ? index_um : 1).get("FC");
|
|
||||||
// qtaor *= fc;
|
|
||||||
// qtaev *= fc;
|
|
||||||
// qtare *= fc;
|
|
||||||
qtaor = _art_giac->convert_to_um(qtaor, "", cur_um, TRUE);
|
qtaor = _art_giac->convert_to_um(qtaor, "", cur_um, TRUE);
|
||||||
qtaev = _art_giac->convert_to_um(qtaev, "", cur_um, TRUE);
|
qtaev = _art_giac->convert_to_um(qtaev, "", cur_um, TRUE);
|
||||||
qtare = _art_giac->convert_to_um(qtare, "", cur_um, TRUE);
|
qtare = _art_giac->convert_to_um(qtare, "", cur_um, TRUE);
|
||||||
@ -168,10 +162,6 @@ bool TOrdine_form::validate(TForm_item &cf, TToken_string &s)
|
|||||||
if (_art_giac->read(rdoc.get(RDOC_CODART)) == NOERR) // Perche' non RDOC_CODARTMAG ???
|
if (_art_giac->read(rdoc.get(RDOC_CODART)) == NOERR) // Perche' non RDOC_CODARTMAG ???
|
||||||
{
|
{
|
||||||
real qt(cf.get());
|
real qt(cf.get());
|
||||||
/*
|
|
||||||
const real fc = _art_giac->um().row(_art_giac->find_um(cur_um)).get("FC");
|
|
||||||
qt *= fc;
|
|
||||||
*/
|
|
||||||
qt = _art_giac->convert_to_um(qt, cur_um, um, TRUE);
|
qt = _art_giac->convert_to_um(qt, cur_um, um, TRUE);
|
||||||
|
|
||||||
cf.set(qt.string());
|
cf.set(qt.string());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user