Patch level :10.0

Files correlati     :lv2.exe
Ricompilazione Demo : [ ]
Commento            :
Gestito il flag "riferimenti in testata" sulla configurazione e fatturazione


git-svn-id: svn://10.65.10.50/trunk@19096 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
rajitgill 2009-07-08 09:03:08 +00:00
parent 15d685f999
commit c9c393bbed
3 changed files with 43 additions and 40 deletions

View File

@ -17,7 +17,8 @@
#define F_CODNUM_FAT 205
#define F_DESNUM_FAT 206
#define F_TIPODOC_FAT 207
#define F_DESTIPODOC_FAT 209
#define F_DESTIPODOC_FAT 208
#define F_RIFTEST 209
#define F_CODNUM_ORF 210
#define F_DESNUM_ORF 211

View File

@ -119,7 +119,7 @@ BEGIN
COPY OUTPUT F_TIPODOC_GEN
END
GROUPBOX DLG_NULL 78 4
GROUPBOX DLG_NULL 78 5
BEGIN
PROMPT 1 5 "@bFatture"
END
@ -177,14 +177,20 @@ BEGIN
COPY OUTPUT F_TIPODOC_FAT
END
BOOLEAN F_RIFTEST
BEGIN
PROMPT 2 8 "Scrivi riferimenti in testata documento"
FIELD RifTest
END
GROUPBOX DLG_NULL 78 4
BEGIN
PROMPT 1 9 "@bOrdini fornitori"
PROMPT 1 10 "@bOrdini fornitori"
END
STRING F_CODNUM_ORF 4
BEGIN
PROMPT 2 10 "Numerazione "
PROMPT 2 11 "Numerazione "
FIELD NUM_ORF
HELP "Codice numerazione"
USE %NUM
@ -200,7 +206,7 @@ END
STRING F_DESNUM_ORF 50
BEGIN
PROMPT 24 10 ""
PROMPT 24 11 ""
HELP "Descrizione Numerazione"
USE %NUM KEY 2
INPUT S0 F_DESNUM_ORF
@ -211,7 +217,7 @@ END
STRING F_TIPODOC_ORF 4
BEGIN
PROMPT 2 11 "Tipo "
PROMPT 2 12 "Tipo "
FIELD TIPODOC_ORF
HELP "Codice tipo documento"
USE %TIP
@ -226,7 +232,7 @@ END
STRING F_DESTIPODOC_ORF 50
BEGIN
PROMPT 24 11 ""
PROMPT 24 12 ""
HELP "Descrizione tipo documento"
USE %TIP KEY 2
INPUT S0 F_DESTIPODOC_ORF
@ -237,12 +243,12 @@ END
GROUPBOX DLG_NULL 78 4
BEGIN
PROMPT 1 13 "@bOrdini clienti"
PROMPT 1 14 "@bOrdini clienti"
END
STRING F_CODNUM_ORC 4
BEGIN
PROMPT 2 14 "Numerazione "
PROMPT 2 15 "Numerazione "
FIELD NUM_ORC
HELP "Codice numerazione"
USE %NUM
@ -258,7 +264,7 @@ END
STRING F_DESNUM_ORC 50
BEGIN
PROMPT 24 14 ""
PROMPT 24 15 ""
HELP "Descrizione Numerazione"
USE %NUM KEY 2
INPUT S0 F_DESNUM_ORC
@ -269,7 +275,7 @@ END
STRING F_TIPODOC_ORC 4
BEGIN
PROMPT 2 15 "Tipo "
PROMPT 2 16 "Tipo "
FIELD TIPODOC_ORC
HELP "Codice tipo documento"
USE %TIP
@ -284,7 +290,7 @@ END
STRING F_DESTIPODOC_ORC 50
BEGIN
PROMPT 24 15 ""
PROMPT 24 16 ""
HELP "Descrizione tipo documento"
USE %TIP KEY 2
INPUT S0 F_DESTIPODOC_ORC
@ -295,13 +301,13 @@ END
GROUPBOX DLG_NULL 78 3
BEGIN
PROMPT 1 17 "@bCausale di default"
PROMPT 1 18 "@bCausale di default"
END
STRING F_CAUSLAV 3
BEGIN
PROMPT 2 18 "Causale "
PROMPT 2 19 "Causale "
USE &CAU
INPUT CODTAB F_CAUSLAV
DISPLAY "Codice" CODTAB
@ -314,7 +320,7 @@ END
STRING F_CAUSLAVDESC 50
BEGIN
PROMPT 24 18 ""
PROMPT 24 19 ""
USE CAU KEY 2
INPUT S0 F_CAUSLAVDESC
DISPLAY "Descrizione@50" S0

View File

@ -131,6 +131,7 @@ void TFatturazione_lavanderie::post_process_output(TLista_documenti& doc_out)
bool fixdotin = false;
bool elcons = contr.get_bool(LVCONDV_ELCONS);
bool rifbol = contr.get_bool(LVCONDV_RIFBOL);
bool riftest = ini_get_bool(CONFIG_DITTA, "lv", "RigTest");
if (doc.physical_rows()>0 && doc[1].is_descrizione())
{
@ -146,6 +147,13 @@ void TFatturazione_lavanderie::post_process_output(TLista_documenti& doc_out)
doc.destroy_row(1,true);
}
if (riftest)
{
TRiga_documento& rout = doc[1];
TString80 descr = rout.get_date(RDOC_DESCR);
doc.put(DOC_NOTE,descr);
}
const bool ragart = contr.get_bool(LVCONDV_RAGART); // leggo il flag di testata raggruppa su unico articolo
const int tipocan = contr.get_int(LVCONDV_TIPOCAN); // leggo il tipo canone
@ -163,7 +171,7 @@ void TFatturazione_lavanderie::post_process_output(TLista_documenti& doc_out)
const int rigamerce = doc[1].is_descrizione()?2:1;
for (int i=rigamerce; i<=rows; i++)
for (int i=rigamerce; i<=rows; i++)
doc.destroy_row(i);
TRiga_documento& riga=doc.new_row("01");
@ -199,7 +207,7 @@ void TFatturazione_lavanderie::post_process_output(TLista_documenti& doc_out)
break;
}
else
else // se non è selezionato raggrupa su unico articolo controllo il tipo canone se è impostato a importo fisso
if (tipocan==1) //se è selezionato tipo canone = importo fisso
{
// estraggo il canone fisso e l'articolo in configurazione
@ -491,22 +499,19 @@ void TFatturazione_lavanderie::post_process_output(TLista_documenti& doc_out)
break;
case 5: //forfait = FISSO SU DOTAZIONE INIZIALE
{
// if (!fixdotin)
// {
// fixdotin=true;
rout.put(RDOC_PREZZO, rcont.get_real(LVRCONDV_IMPFISART));
rout.put(RDOC_QTA, artlav.clifomag(annoes)[index].get_real("DOTIN"));
/* for (int h = doc.physical_rows(); h > i; h--)
const TString80 codartorig=rout.get(RDOC_CODART);
for (int h = doc.physical_rows(); h > i; h--)
{
TRiga_documento& delrow = doc[h];
const TString80 codart=delrow.get(RDOC_CODART);
const TRectype & rcont=contr.row(codart);
const int forfdotin = rcont.get_int(LVRCONDV_TIPOFORF);
if (forfdotin == 5)
const TString80 codart=delrow.get(RDOC_CODART);
if ( codartorig == codart)
doc.destroy_row(h,true);
} */
// }
}
}
}
break;
default:
break;
@ -603,7 +608,7 @@ void TFatturazione_lavanderie::create_row(TDocumento& doc_out, const TRiga_docum
//leggo dal documento i valori che vanno riportati sulla fattura e recupero la riga contratto
//di quell'articolo
const TString80 codart = rin.get(RDOC_CODARTMAG);
const TString80 codart = rin.get(RDOC_CODARTMAG); // non è gestito il caso di un articolo fuori contratto
const real qta = rin.get_real(RDOC_QTA);
const real qta1 = rin.get_real(RDOC_QTAGG1);
const TRectype& rcont = contr.row(codart);
@ -616,18 +621,9 @@ void TFatturazione_lavanderie::create_row(TDocumento& doc_out, const TRiga_docum
//Se tipoprezzo == 1 (prezzo da bolla), allora leggo il prezzo sulla riga della bolla
if (tipoprezzo == 0)
{
if (rcont.empty())
{
TArticolo& art = cached_article(codart);
const TString& um = rin.get(RDOC_UMQTA);
const int index = art.find_um(um);
if (index >= 0)
prezzo = art.um()[index].get_real(UMART_PREZZO);
}
else
if (!rcont.empty())
prezzo = rcont.get_real(LVRCONDV_PREZZO);
}
}
else
prezzo = rin.get_real(RDOC_PREZZO);