Patch level : 10.0 patch ???

Files correlati     : lv2 lv2700a.rep
Ricompilazione Demo : [ ]
Commento            :
Aggiunta la segnalazione se sforo le 22 colonne


git-svn-id: svn://10.65.10.50/branches/R_10_00@22140 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
luca83 2011-05-20 08:57:28 +00:00
parent 63a3385e1a
commit 7970805198
2 changed files with 52 additions and 31 deletions

View File

@ -164,6 +164,8 @@ void TRiepilogoData::add(int posizione, long cliente, const TDate& dataDoc, long
void TRiepBolle_app:: elabora(const TMask& mask)const void TRiepBolle_app:: elabora(const TMask& mask)const
{ {
TRiepilogo riepilogo; TRiepilogo riepilogo;
TDate overflow_date;
long overflow_clifo;
{ {
TISAM_recordset riep(get_query(true,mask)); TISAM_recordset riep(get_query(true,mask));
@ -176,6 +178,7 @@ void TRiepBolle_app:: elabora(const TMask& mask)const
TProgind pi(riep.items(), TR("Estrazione articoli"), true, true); TProgind pi(riep.items(), TR("Estrazione articoli"), true, true);
int count = 1; int count = 1;
for(bool ok = riep.move_first(); ok && pi.addstatus(1); ok = riep.move_next()) for(bool ok = riep.move_first(); ok && pi.addstatus(1); ok = riep.move_next())
{ {
const TDate dataDoc = riep.get("DOC.DATADOC").as_date(); const TDate dataDoc = riep.get("DOC.DATADOC").as_date();
@ -186,8 +189,9 @@ void TRiepBolle_app:: elabora(const TMask& mask)const
const TString4 causale = riep.get("CODAGG1").as_string(); const TString4 causale = riep.get("CODAGG1").as_string();
TCausale_lavanderie cau(causale); TCausale_lavanderie cau(causale);
//se la causale è di reso devo leggere il ritirato e non il consegnato //se la causale è di reso devo leggere il ritirato e non il consegnato
long qta; long qta = 0L;
if(cau.is_reso())
if(cau.is_reso() && mask.get_bool(F_CHECK_NO_RESI))
qta = riep.get("QTAGG1").as_int(); qta = riep.get("QTAGG1").as_int();
else else
qta = riep.get("QTA").as_int(); qta = riep.get("QTA").as_int();
@ -295,9 +299,10 @@ void TRiepBolle_app:: elabora(const TMask& mask)const
{ {
contatore = sD._posizione; contatore = sD._posizione;
if(72 < contatore)
{
TString8 tt2; TString8 tt2;
tt2.format("%02d-%02d", s._dataDoc.day(), s._dataDoc.month()); tt2.format("%02d-%02d", s._dataDoc.day(), s._dataDoc.month());
riep_set->set(contatore, tt2); riep_set->set(contatore, tt2);
contatore++; contatore++;
riep_set->set(contatore,s._numeroDoc); riep_set->set(contatore,s._numeroDoc);
@ -316,6 +321,15 @@ void TRiepBolle_app:: elabora(const TMask& mask)const
riep_set->set(contatore,TVariant(long (0))); riep_set->set(contatore,TVariant(long (0)));
contatore++; contatore++;
} }
}
else
{
if(!overflow_date.ok())
{
overflow_date = s._dataDoc;
overflow_clifo = s._cliente;
}
}
break; break;
} }
else else
@ -333,6 +347,13 @@ void TRiepBolle_app:: elabora(const TMask& mask)const
riep_set->save_as("c:/temp/riepilogoBolla.txt"); riep_set->save_as("c:/temp/riepilogoBolla.txt");
#endif #endif
if(overflow_date.ok())
{
TString str;
str << "Non è stato possibile stampare i documenti a partire dalla data " << overflow_date.string() << " per il cliente " << overflow_clifo;
warning_box(str);
}
if(stampa) if(stampa)
{ {
//carica tutte le variabili del report. //carica tutte le variabili del report.

View File

@ -2,7 +2,7 @@
<report name="lv2700a" orientation="2" lpi="6"> <report name="lv2700a" orientation="2" lpi="6">
<description>Riepilogo Bolle di Lavanderia</description> <description>Riepilogo Bolle di Lavanderia</description>
<font face="Courier New" size="7" /> <font face="Courier New" size="7" />
<section type="Head"> <section type="Head" pattern="1">
<field x="3" type="Testo" width="12" height="1.5" pattern="1" text="Data elab. :" /> <field x="3" type="Testo" width="12" height="1.5" pattern="1" text="Data elab. :" />
<field x="15.5" type="Stringa" width="15" pattern="1"> <field x="15.5" type="Stringa" width="15" pattern="1">
<prescript description="H0.0 PRESCRIPT">MESSAGE _TODAY</prescript> <prescript description="H0.0 PRESCRIPT">MESSAGE _TODAY</prescript>
@ -15,8 +15,8 @@
<prescript description="H0.0 PRESCRIPT">MESSAGE _PAGENO</prescript> <prescript description="H0.0 PRESCRIPT">MESSAGE _PAGENO</prescript>
</field> </field>
</section> </section>
<section type="Head" level="1" /> <section type="Head" level="1" pattern="1" />
<section repeat="1" type="Head" level="2" height="4.5" page_break="1"> <section repeat="1" type="Head" level="2" height="4.5" page_break="1" pattern="1">
<groupby>A</groupby> <groupby>A</groupby>
<field type="Testo" width="10" pattern="1" text="Cliente:"> <field type="Testo" width="10" pattern="1" text="Cliente:">
<font face="Courier New" bold="1" size="7" /> <font face="Courier New" bold="1" size="7" />
@ -180,8 +180,8 @@
</field> </field>
<field border="1" y="4" type="Linea" width="192" height="0" pattern="1" /> <field border="1" y="4" type="Linea" width="192" height="0" pattern="1" />
</section> </section>
<section type="Body" /> <section type="Body" pattern="1" />
<section type="Body" level="1"> <section type="Body" level="1" pattern="1">
<field type="Stringa" width="20" pattern="1"> <field type="Stringa" width="20" pattern="1">
<source>C</source> <source>C</source>
<prescript description="B1.0 PRESCRIPT">MESSAGE RESET,1000</prescript> <prescript description="B1.0 PRESCRIPT">MESSAGE RESET,1000</prescript>
@ -191,7 +191,7 @@
</field> </field>
<field x="50" type="Numero" align="right" width="5" pattern="1" hide_zero="1"> <field x="50" type="Numero" align="right" width="5" pattern="1" hide_zero="1">
<source>G</source> <source>G</source>
<prescript description="B1.0 PRESCRIPT">MESSAGE ADD,1000</prescript> <prescript description="B1.0 PRESCRIPT">MESSAGE COPY,1000</prescript>
</field> </field>
<field x="56" type="Numero" align="right" width="5" pattern="1" hide_zero="1"> <field x="56" type="Numero" align="right" width="5" pattern="1" hide_zero="1">
<source>J</source> <source>J</source>
@ -279,7 +279,7 @@
</field> </field>
<field x="182" type="Numero" align="right" width="8" id="1000" pattern="1" hide_zero="1" /> <field x="182" type="Numero" align="right" width="8" id="1000" pattern="1" hide_zero="1" />
</section> </section>
<section type="Foot" /> <section type="Foot" pattern="1" />
<section type="Foot" level="1" /> <section type="Foot" level="1" pattern="1" />
<section type="Foot" level="2" /> <section type="Foot" level="2" pattern="1" />
</report> </report>