Correzione errori
git-svn-id: svn://10.65.10.50/trunk@5071 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
d4dbe18c39
commit
ea9a88fa7d
@ -555,9 +555,9 @@ void TCond_vendita::update_omaggi(bool full)
|
|||||||
real qta = _riga->get(FR_QTA);
|
real qta = _riga->get(FR_QTA);
|
||||||
|
|
||||||
if (full || qta != ZERO)
|
if (full || qta != ZERO)
|
||||||
{
|
{
|
||||||
const TString80 codart_omaggio(_rcondv.get("CODARTOM"));
|
const TString80 codart_omaggio(_rcondv.get("CODARTOM"));
|
||||||
|
|
||||||
if (tipo_riga[0] == '_')
|
if (tipo_riga[0] == '_')
|
||||||
{
|
{
|
||||||
TConfig cnf(CONFIG_STUDIO, "ve");
|
TConfig cnf(CONFIG_STUDIO, "ve");
|
||||||
@ -568,7 +568,12 @@ void TCond_vendita::update_omaggi(bool full)
|
|||||||
qta *= _rcondv.get_real("QOM");
|
qta *= _rcondv.get_real("QOM");
|
||||||
if (codart_omaggio.not_empty() && tipo_riga.not_empty() && qta != ZERO)
|
if (codart_omaggio.not_empty() && tipo_riga.not_empty() && qta != ZERO)
|
||||||
{
|
{
|
||||||
|
TRiga_documento & curr_row = doc[current_doc_row];
|
||||||
|
|
||||||
|
curr_row.autosave(sh);
|
||||||
|
|
||||||
TRiga_documento & r = doc.insert_row(current_doc_row + 1, tipo_riga);
|
TRiga_documento & r = doc.insert_row(current_doc_row + 1, tipo_riga);
|
||||||
|
|
||||||
r.generata();
|
r.generata();
|
||||||
TString16 codmag(_riga->get(FR_CODMAG)); codmag << _riga->get(FR_CODDEP);
|
TString16 codmag(_riga->get(FR_CODMAG)); codmag << _riga->get(FR_CODDEP);
|
||||||
r.put("CODMAG", codmag);
|
r.put("CODMAG", codmag);
|
||||||
@ -590,6 +595,7 @@ void TCond_vendita::update_omaggi(bool full)
|
|||||||
const real prezzo_omaggio = normalize_valuta(_rcondv.get_real("PROMAGGIO"), _condv.get("CODVAL"));
|
const real prezzo_omaggio = normalize_valuta(_rcondv.get_real("PROMAGGIO"), _condv.get("CODVAL"));
|
||||||
r.put("PREZZO", prezzo_omaggio);
|
r.put("PREZZO", prezzo_omaggio);
|
||||||
update = TRUE;
|
update = TRUE;
|
||||||
|
curr_row.autoload(sh);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (update)
|
if (update)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user