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:
		
							parent
							
								
									63a3385e1a
								
							
						
					
					
						commit
						7970805198
					
				@ -164,6 +164,8 @@ void TRiepilogoData::add(int posizione, long cliente, const TDate& dataDoc, long
 | 
			
		||||
void TRiepBolle_app:: elabora(const TMask& mask)const
 | 
			
		||||
{
 | 
			
		||||
  TRiepilogo riepilogo;
 | 
			
		||||
  TDate overflow_date;
 | 
			
		||||
  long  overflow_clifo;
 | 
			
		||||
  {
 | 
			
		||||
    TISAM_recordset riep(get_query(true,mask));
 | 
			
		||||
 | 
			
		||||
@ -176,7 +178,8 @@ void TRiepBolle_app:: elabora(const TMask& mask)const
 | 
			
		||||
 | 
			
		||||
    TProgind pi(riep.items(), TR("Estrazione articoli"), true, true);
 | 
			
		||||
    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 long cliente  = riep.get("DOC.CODCF").as_int();
 | 
			
		||||
@ -186,8 +189,9 @@ void TRiepBolle_app:: elabora(const TMask& mask)const
 | 
			
		||||
      const TString4 causale = riep.get("CODAGG1").as_string();
 | 
			
		||||
      TCausale_lavanderie cau(causale);
 | 
			
		||||
      //se la causale è di reso devo leggere il ritirato e non il consegnato
 | 
			
		||||
      long qta;
 | 
			
		||||
      if(cau.is_reso())
 | 
			
		||||
      long qta = 0L;
 | 
			
		||||
 | 
			
		||||
      if(cau.is_reso() && mask.get_bool(F_CHECK_NO_RESI))
 | 
			
		||||
        qta = riep.get("QTAGG1").as_int();
 | 
			
		||||
      else
 | 
			
		||||
        qta = riep.get("QTA").as_int();
 | 
			
		||||
@ -197,7 +201,7 @@ void TRiepBolle_app:: elabora(const TMask& mask)const
 | 
			
		||||
    } 
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
   TRiepBolle_report rep;
 | 
			
		||||
  TRiepBolle_report rep;
 | 
			
		||||
  bool stampa = rep.load("lv2700a");
 | 
			
		||||
  TRiepBolle_recordset* riep_set = new TRiepBolle_recordset();
 | 
			
		||||
  rep.set_recordset(riep_set);
 | 
			
		||||
@ -295,26 +299,36 @@ void TRiepBolle_app:: elabora(const TMask& mask)const
 | 
			
		||||
      {
 | 
			
		||||
        contatore = sD._posizione;
 | 
			
		||||
 | 
			
		||||
        TString8 tt2; 
 | 
			
		||||
        tt2.format("%02d-%02d", s._dataDoc.day(), s._dataDoc.month());
 | 
			
		||||
 | 
			
		||||
        riep_set->set(contatore, tt2);
 | 
			
		||||
        contatore++;
 | 
			
		||||
        riep_set->set(contatore,s._numeroDoc);
 | 
			
		||||
        contatore++;
 | 
			
		||||
        const long qta = riep_set->get(contatore).as_int() + s._qta;
 | 
			
		||||
        riep_set->set(contatore,qta);
 | 
			
		||||
        contatore++;  
 | 
			
		||||
 | 
			
		||||
        TArray* p = (TArray*) obj;
 | 
			
		||||
        int e = p->size();
 | 
			
		||||
        e=e+1;
 | 
			
		||||
        while(72>contatore)
 | 
			
		||||
        if(72 < contatore)
 | 
			
		||||
        {
 | 
			
		||||
          TString8 tt2; 
 | 
			
		||||
          tt2.format("%02d-%02d", s._dataDoc.day(), s._dataDoc.month());
 | 
			
		||||
          riep_set->set(contatore, tt2);
 | 
			
		||||
          contatore++;
 | 
			
		||||
          riep_set->set(contatore,s._numeroDoc);
 | 
			
		||||
          contatore++;
 | 
			
		||||
          riep_set->set(contatore,TVariant(long (0)));
 | 
			
		||||
          const long qta = riep_set->get(contatore).as_int() + s._qta;
 | 
			
		||||
          riep_set->set(contatore,qta);
 | 
			
		||||
          contatore++;  
 | 
			
		||||
 | 
			
		||||
          TArray* p = (TArray*) obj;
 | 
			
		||||
          int e = p->size();
 | 
			
		||||
          e=e+1;
 | 
			
		||||
          while(72>contatore)
 | 
			
		||||
          {
 | 
			
		||||
            contatore++;
 | 
			
		||||
            contatore++;
 | 
			
		||||
            riep_set->set(contatore,TVariant(long (0)));
 | 
			
		||||
            contatore++;  
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
        else
 | 
			
		||||
        {
 | 
			
		||||
          if(!overflow_date.ok())
 | 
			
		||||
          {
 | 
			
		||||
            overflow_date  = s._dataDoc;
 | 
			
		||||
            overflow_clifo = s._cliente;
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
        break;
 | 
			
		||||
      }  
 | 
			
		||||
@ -333,6 +347,13 @@ void TRiepBolle_app:: elabora(const TMask& mask)const
 | 
			
		||||
  riep_set->save_as("c:/temp/riepilogoBolla.txt");
 | 
			
		||||
#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)
 | 
			
		||||
  {
 | 
			
		||||
    //carica tutte le variabili del report.
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
<report name="lv2700a" orientation="2" lpi="6">
 | 
			
		||||
 <description>Riepilogo Bolle di Lavanderia</description>
 | 
			
		||||
 <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="15.5" type="Stringa" width="15" pattern="1">
 | 
			
		||||
   <prescript description="H0.0 PRESCRIPT">MESSAGE _TODAY</prescript>
 | 
			
		||||
@ -15,8 +15,8 @@
 | 
			
		||||
   <prescript description="H0.0 PRESCRIPT">MESSAGE _PAGENO</prescript>
 | 
			
		||||
  </field>
 | 
			
		||||
 </section>
 | 
			
		||||
 <section type="Head" level="1" />
 | 
			
		||||
 <section repeat="1" type="Head" level="2" height="4.5" page_break="1">
 | 
			
		||||
 <section type="Head" level="1" pattern="1" />
 | 
			
		||||
 <section repeat="1" type="Head" level="2" height="4.5" page_break="1" pattern="1">
 | 
			
		||||
  <groupby>A</groupby>
 | 
			
		||||
  <field type="Testo" width="10" pattern="1" text="Cliente:">
 | 
			
		||||
   <font face="Courier New" bold="1" size="7" />
 | 
			
		||||
@ -180,8 +180,8 @@
 | 
			
		||||
  </field>
 | 
			
		||||
  <field border="1" y="4" type="Linea" width="192" height="0" pattern="1" />
 | 
			
		||||
 </section>
 | 
			
		||||
 <section type="Body" />
 | 
			
		||||
 <section type="Body" level="1">
 | 
			
		||||
 <section type="Body" pattern="1" />
 | 
			
		||||
 <section type="Body" level="1" pattern="1">
 | 
			
		||||
  <field type="Stringa" width="20" pattern="1">
 | 
			
		||||
   <source>C</source>
 | 
			
		||||
   <prescript description="B1.0 PRESCRIPT">MESSAGE RESET,1000</prescript>
 | 
			
		||||
@ -191,7 +191,7 @@
 | 
			
		||||
  </field>
 | 
			
		||||
  <field x="50" type="Numero" align="right" width="5" pattern="1" hide_zero="1">
 | 
			
		||||
   <source>G</source>
 | 
			
		||||
   <prescript description="B1.0 PRESCRIPT">MESSAGE ADD,1000</prescript>
 | 
			
		||||
   <prescript description="B1.0 PRESCRIPT">MESSAGE COPY,1000</prescript>
 | 
			
		||||
  </field>
 | 
			
		||||
  <field x="56" type="Numero" align="right" width="5" pattern="1" hide_zero="1">
 | 
			
		||||
   <source>J</source>
 | 
			
		||||
@ -279,7 +279,7 @@
 | 
			
		||||
  </field>
 | 
			
		||||
  <field x="182" type="Numero" align="right" width="8" id="1000" pattern="1" hide_zero="1" />
 | 
			
		||||
 </section>
 | 
			
		||||
 <section type="Foot" />
 | 
			
		||||
 <section type="Foot" level="1" />
 | 
			
		||||
 <section type="Foot" level="2" />
 | 
			
		||||
 <section type="Foot" pattern="1" />
 | 
			
		||||
 <section type="Foot" level="1" pattern="1" />
 | 
			
		||||
 <section type="Foot" level="2" pattern="1" />
 | 
			
		||||
</report>
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user