Patch level :aga 2.0
Files correlati :or1.exe Ricompilazione Demo : [ ] Commento :corretto errore di riporto git-svn-id: svn://10.65.10.50/trunk@10725 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
dd8e575daf
commit
1741319a11
135
or/orlib01.cpp
135
or/orlib01.cpp
@ -337,89 +337,72 @@ bool TOrdine_form::validate(TForm_item &cf, TToken_string &s)
|
|||||||
}
|
}
|
||||||
// Ignore any other command
|
// Ignore any other command
|
||||||
}
|
}
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
if (action == "PREZZONS")
|
if (action == "PREZZONS")
|
||||||
{
|
{
|
||||||
real pns = rdoc.prezzo(TRUE,FALSE); // Prezzo netto scontato
|
real pns = rdoc.prezzo(TRUE,FALSE); // Prezzo netto scontato
|
||||||
cf.set(pns.string());
|
cf.set(pns.string());
|
||||||
} else
|
}
|
||||||
if (action == "RAGSOC")
|
else
|
||||||
{
|
if (action == "RAGSOC")
|
||||||
// Compone la ragione sociale (considera gli occasionali)
|
{
|
||||||
// Il formato è il seguente: CODICE (OCFPI) RAGIONE_SOCIALE
|
// Compone la ragione sociale (considera gli occasionali)
|
||||||
TString ws;
|
// Il formato è il seguente: CODICE (OCFPI) RAGIONE_SOCIALE
|
||||||
const bool print_cod = s.get_int(2);
|
TString ws;
|
||||||
TDocumento& documento = (TDocumento&)cf.form().cursor()->curr(LF_DOC);
|
const bool print_cod = s.get_int(2) != 0;
|
||||||
TCli_for& cli_for = documento.clifor();
|
TDocumento& documento = (TDocumento&)cf.form().cursor()->curr(LF_DOC);
|
||||||
TOccasionale& cli_occ = documento.occas();
|
TCli_for& cli_for = documento.clifor();
|
||||||
const bool occasionale = cli_for.occasionale();
|
TOccasionale& cli_occ = documento.occas();
|
||||||
if (print_cod)
|
const bool occasionale = cli_for.occasionale();
|
||||||
ws << cli_for.get("CODCF") << " ";
|
if (print_cod)
|
||||||
if (occasionale)
|
ws << cli_for.get("CODCF") << " ";
|
||||||
{
|
if (occasionale)
|
||||||
ws << "(" << cli_occ.get("CFPI") << ") " ;
|
{
|
||||||
ws << cli_occ.get("RAGSOC");
|
ws << "(" << cli_occ.get("CFPI") << ") " ;
|
||||||
}
|
ws << cli_occ.get("RAGSOC");
|
||||||
else
|
|
||||||
if (action == "RAGSOC")
|
|
||||||
{
|
|
||||||
// Compone la ragione sociale (considera gli occasionali)
|
|
||||||
// Il formato è il seguente: CODICE (OCFPI) RAGIONE_SOCIALE
|
|
||||||
TString ws;
|
|
||||||
const bool print_cod = s.get_int(2)!=0;
|
|
||||||
TDocumento& documento = (TDocumento&)cf.form().cursor()->file(LF_DOC).curr();
|
|
||||||
TCli_for& cli_for = documento.clifor();
|
|
||||||
TOccasionale& cli_occ = documento.occas();
|
|
||||||
const bool occasionale = cli_for.occasionale();
|
|
||||||
if (print_cod)
|
|
||||||
ws << cli_for.get("CODCF") << " ";
|
|
||||||
if (occasionale)
|
|
||||||
{
|
|
||||||
ws << "(" << cli_occ.get("CFPI") << ") " ;
|
|
||||||
ws << cli_occ.get("RAGSOC");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
ws << cli_for.get("RAGSOC");
|
|
||||||
cf.set(ws);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (action == "QTA")
|
ws << cli_for.get("RAGSOC");
|
||||||
{
|
cf.set(ws);
|
||||||
cf.set(rdoc.quantita().string());
|
}
|
||||||
} else
|
else
|
||||||
if (action == "QTAEVASA")
|
if (action == "QTA")
|
||||||
{
|
{
|
||||||
cf.set(rdoc.qtaevasa().string());
|
cf.set(rdoc.quantita().string());
|
||||||
} else
|
} else
|
||||||
if (action == "RESIDUO")
|
if (action == "QTAEVASA")
|
||||||
{
|
{
|
||||||
cf.set(rdoc.qtaresidua().string());
|
cf.set(rdoc.qtaevasa().string());
|
||||||
} else
|
} else
|
||||||
if (action == "VALORE")
|
if (action == "RESIDUO")
|
||||||
{
|
{
|
||||||
cf.set(rdoc.valore(TRUE, AUTO_DECIMALS).string());
|
cf.set(rdoc.qtaresidua().string());
|
||||||
} else
|
} else
|
||||||
if (action == "VALRES")
|
if (action == "VALORE")
|
||||||
{
|
{
|
||||||
cf.set(rdoc.valore(FALSE, AUTO_DECIMALS).string());
|
cf.set(rdoc.valore(TRUE, AUTO_DECIMALS).string());
|
||||||
} else
|
} else
|
||||||
if (action == "GIACENZA")
|
if (action == "VALRES")
|
||||||
{
|
{
|
||||||
real g = ZERO;
|
cf.set(rdoc.valore(FALSE, AUTO_DECIMALS).string());
|
||||||
const TString& codart = rdoc.get(RDOC_CODARTMAG);
|
} else
|
||||||
if (codart.not_empty() && _art_giac->read(codart) == NOERR)
|
if (action == "GIACENZA")
|
||||||
{
|
{
|
||||||
const TDate oggi(TODAY);
|
real g = ZERO;
|
||||||
TString16 annoes; annoes.format("%04d", _esercizi->date2esc(oggi));
|
const TString& codart = rdoc.get(RDOC_CODARTMAG);
|
||||||
const TString16 codmag(rdoc.get("CODMAG")); // Riferito al magazzino indicato sulla riga...
|
if (codart.not_empty() && _art_giac->read(codart) == NOERR)
|
||||||
const TString16 livello(_level > 0 ? rdoc.get(RDOC_LIVELLO) : "");
|
{
|
||||||
g = _art_giac->disponibilita(annoes, codmag, livello, TRUE); // Giacenza attuale
|
const TDate oggi(TODAY);
|
||||||
}
|
TString16 annoes; annoes.format("%04d", _esercizi->date2esc(oggi));
|
||||||
cf.set(g.string());
|
const TString16 codmag(rdoc.get("CODMAG")); // Riferito al magazzino indicato sulla riga...
|
||||||
|
const TString16 livello(_level > 0 ? rdoc.get(RDOC_LIVELLO) : "");
|
||||||
|
g = _art_giac->disponibilita(annoes, codmag, livello, TRUE); // Giacenza attuale
|
||||||
}
|
}
|
||||||
|
cf.set(g.string());
|
||||||
|
}
|
||||||
//Ignore any other command
|
//Ignore any other command
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
return TForm::validate(cf, s);
|
return TForm::validate(cf, s);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user