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_CODNUM_FAT 205
#define F_DESNUM_FAT 206 #define F_DESNUM_FAT 206
#define F_TIPODOC_FAT 207 #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_CODNUM_ORF 210
#define F_DESNUM_ORF 211 #define F_DESNUM_ORF 211

View File

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

View File

@ -131,6 +131,7 @@ void TFatturazione_lavanderie::post_process_output(TLista_documenti& doc_out)
bool fixdotin = false; bool fixdotin = false;
bool elcons = contr.get_bool(LVCONDV_ELCONS); bool elcons = contr.get_bool(LVCONDV_ELCONS);
bool rifbol = contr.get_bool(LVCONDV_RIFBOL); 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()) 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); 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 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 const int tipocan = contr.get_int(LVCONDV_TIPOCAN); // leggo il tipo canone
@ -199,7 +207,7 @@ void TFatturazione_lavanderie::post_process_output(TLista_documenti& doc_out)
break; 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 if (tipocan==1) //se è selezionato tipo canone = importo fisso
{ {
// estraggo il canone fisso e l'articolo in configurazione // estraggo il canone fisso e l'articolo in configurazione
@ -491,21 +499,18 @@ void TFatturazione_lavanderie::post_process_output(TLista_documenti& doc_out)
break; break;
case 5: //forfait = FISSO SU DOTAZIONE INIZIALE case 5: //forfait = FISSO SU DOTAZIONE INIZIALE
{ {
// if (!fixdotin)
// {
// fixdotin=true;
rout.put(RDOC_PREZZO, rcont.get_real(LVRCONDV_IMPFISART)); rout.put(RDOC_PREZZO, rcont.get_real(LVRCONDV_IMPFISART));
rout.put(RDOC_QTA, artlav.clifomag(annoes)[index].get_real("DOTIN")); 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]; TRiga_documento& delrow = doc[h];
const TString80 codart=delrow.get(RDOC_CODART); const TString80 codart=delrow.get(RDOC_CODART);
const TRectype & rcont=contr.row(codart); if ( codartorig == codart)
const int forfdotin = rcont.get_int(LVRCONDV_TIPOFORF);
if (forfdotin == 5)
doc.destroy_row(h,true); doc.destroy_row(h,true);
} */ }
// }
} }
break; break;
default: default:
@ -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 //leggo dal documento i valori che vanno riportati sulla fattura e recupero la riga contratto
//di quell'articolo //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 qta = rin.get_real(RDOC_QTA);
const real qta1 = rin.get_real(RDOC_QTAGG1); const real qta1 = rin.get_real(RDOC_QTAGG1);
const TRectype& rcont = contr.row(codart); const TRectype& rcont = contr.row(codart);
@ -616,16 +621,7 @@ 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 //Se tipoprezzo == 1 (prezzo da bolla), allora leggo il prezzo sulla riga della bolla
if (tipoprezzo == 0) if (tipoprezzo == 0)
{ {
if (rcont.empty()) 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
prezzo = rcont.get_real(LVRCONDV_PREZZO); prezzo = rcont.get_real(LVRCONDV_PREZZO);
} }
else else