Patch level : 10.0 patch 493
Files correlati : lv2 Ricompilazione Demo : [ ] Commento : Corretta la gestione delle unita' di misura sulle righe documento create in automatico git-svn-id: svn://10.65.10.50/trunk@19554 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
b8ab31b9e2
commit
5fba740746
@ -18,9 +18,9 @@
|
||||
|
||||
#include "lv2400a.h"
|
||||
|
||||
//////////////////////////////////////
|
||||
/////////////////////////////////////
|
||||
//// TGENERA_DOCUMENTI_MSK ////
|
||||
//////////////////////////////////////
|
||||
/////////////////////////////////////
|
||||
|
||||
//classe TGenera_documenti_msk
|
||||
class TGenera_documenti_msk : public TAutomask
|
||||
@ -42,12 +42,12 @@ bool TGenera_documenti_msk::on_field_event(TOperable_field& o, TField_event e, l
|
||||
//classe TGenera_documenti_app
|
||||
class TGenera_documenti_app : public TSkeleton_application
|
||||
{
|
||||
TGenera_documenti_msk* _msk;
|
||||
TAssoc_array _quantita;
|
||||
TAssoc_array _quantita_ritirata;
|
||||
TConfig* _configlv;
|
||||
char _buono;
|
||||
long _ndoc;
|
||||
TGenera_documenti_msk* _msk;
|
||||
TAssoc_array _quantita;
|
||||
TAssoc_array _quantita_ritirata;
|
||||
TConfig* _configlv;
|
||||
char _buono;
|
||||
long _ndoc;
|
||||
|
||||
private:
|
||||
//Metodi per la generazione dei documenti
|
||||
@ -223,7 +223,7 @@ void TGenera_documenti_app::crea_riga(const TString& codart, const char modpas,
|
||||
TString4 tiporiga;
|
||||
switch (_buono)
|
||||
{
|
||||
case 'P': tiporiga = "21"; break;
|
||||
case 'P': tiporiga = "24"; break;
|
||||
case 'C': tiporiga = "21"; break;
|
||||
default: break;
|
||||
}
|
||||
@ -327,6 +327,14 @@ void TGenera_documenti_app::crea_riga(const TString& codart, const char modpas,
|
||||
|
||||
rdoc.put(RDOC_CODMAG, magazzino);
|
||||
rdoc.put(RDOC_CODMAGC, magazzinoc);
|
||||
|
||||
//recupero l'unità di misura principale di quest'articolo
|
||||
TToken_string key;
|
||||
key.add(codart);
|
||||
key.add(1);
|
||||
const TRectype& umart = cache().get(LF_UMART, key);
|
||||
TString4 um = umart.get(UMART_UM);
|
||||
rdoc.put(RDOC_UMQTA, um);
|
||||
}
|
||||
|
||||
if (qta > ZERO)
|
||||
@ -453,6 +461,14 @@ void TGenera_documenti_app::crea_riga(const TString& codart, const char modpas,
|
||||
rdoc.put(RDOC_PREZZO,rcont.get_real(LVRCONDV_PRZDTTMP));
|
||||
rdoc.put(RDOC_SCONTO,rcont.get(LVRCONDV_SCONTPERC)); //sconto
|
||||
}
|
||||
|
||||
//recupero l'unità di misura principale di quest'articolo
|
||||
TToken_string key;
|
||||
key.add(codart);
|
||||
key.add(1);
|
||||
const TRectype& umart = cache().get(LF_UMART, key);
|
||||
TString4 um = umart.get(UMART_UM);
|
||||
rdoc.put(RDOC_UMQTA, um);
|
||||
|
||||
//scrivo il magazzino
|
||||
TString8 magazzino;
|
||||
|
@ -601,6 +601,10 @@ TRiga_documento& TFatturazione_lavanderie::find_or_create_row(TDocumento& doc_ou
|
||||
TRiga_documento& row = doc_out.new_row("01");
|
||||
doc_out.copy_data(row, rin);
|
||||
row.put(RDOC_TIPORIGA, "01");
|
||||
|
||||
const TRectype& anamag = cache().get(LF_ANAMAG, rin.get(RDOC_CODART));
|
||||
row.put(RDOC_CODIVA, anamag.get(ANAMAG_CODIVA));
|
||||
|
||||
row.zero(RDOC_CODAGG1);
|
||||
row.zero(RDOC_QTA);
|
||||
row.zero(RDOC_QTAGG1);
|
||||
@ -651,8 +655,8 @@ void TFatturazione_lavanderie::create_row(TDocumento& doc_out, const TRiga_docum
|
||||
//se passo le condizioni iniziali cerco eventualmente una riga che possa essere raggruppata con quella
|
||||
//che sto guardando adesso, altrimenti la creo; in ogni caso aggiungo la quantità da ritirare
|
||||
//al prezzo segnato in contratto
|
||||
TRiga_documento& rd = find_or_create_row(doc_out, rin ,'D');
|
||||
rd.add(RDOC_QTA, qta1);
|
||||
TRiga_documento& rd = find_or_create_row(doc_out, rin ,'D');
|
||||
rd.add(RDOC_QTA, qta1);
|
||||
rd.put(RDOC_PREZZO, rcont.get_real(LVRCONDV_PREZDAN));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user